<!-- HTML header for doxygen 1.8.6-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/xhtml;charset=utf-8" http-equiv="Content-Type"/>
<meta content="IE=9" http-equiv="X-UA-Compatible"/>
<meta content="Doxygen 1.8.13" name="generator"/>
<title>OpenCV: Structural Analysis and Shape Descriptors</title>
<link href="../../opencv.ico" rel="shortcut icon" type="image/x-icon"/>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script src="../../jquery.js" type="text/javascript"></script>
<script src="../../dynsections.js" type="text/javascript"></script>
<script src="../../tutorial-utils.js" type="text/javascript"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script src="../../search/searchdata.js" type="text/javascript"></script>
<script src="../../search/search.js" type="text/javascript"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
//<![CDATA[
MathJax.Hub.Config(
{
  TeX: {
      Macros: {
          matTT: [ "\\[ \\left|\\begin{array}{ccc} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{array}\\right| \\]", 9],
          fork: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ \\end{array} \\right.", 4],
          forkthree: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ \\end{array} \\right.", 6],
          forkfour: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ #7 & \\mbox{#8}\\\\ \\end{array} \\right.", 8],
          vecthree: ["\\begin{bmatrix} #1\\\\ #2\\\\ #3 \\end{bmatrix}", 3],
          vecthreethree: ["\\begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{bmatrix}", 9],
          cameramatrix: ["#1 = \\begin{bmatrix} f_x & 0 & c_x\\\\ 0 & f_y & c_y\\\\ 0 & 0 & 1 \\end{bmatrix}", 1],
          distcoeffs: ["(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \\tau_x, \\tau_y]]]]) \\text{ of 4, 5, 8, 12 or 14 elements}"],
          distcoeffsfisheye: ["(k_1, k_2, k_3, k_4)"],
          hdotsfor: ["\\dots", 1],
          mathbbm: ["\\mathbb{#1}", 1],
          bordermatrix: ["\\matrix{#1}", 1]
      }
  }
}
);
//]]>
</script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js" type="text/javascript"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css"/>
<link href="../../stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<!--#include virtual="/google-search.html"-->
<table cellpadding="0" cellspacing="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../opencv-logo-small.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenCV
    <span id="projectnumber">4.5.2</span>
   </div>
   <div id="projectbrief">Open Source Computer Vision</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
<script src="../../menudata.js" type="text/javascript"></script>
<script src="../../menu.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
  initMenu('../../',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow" onkeydown="return searchBox.OnSearchSelectKey(event)" onmouseout="return searchBox.OnSearchSelectHide()" onmouseover="return searchBox.OnSearchSelectShow()">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe frameborder="0" id="MSearchResults" name="MSearchResults" src="javascript:void(0)">
</iframe>
</div>
<div class="header">
  <div class="summary">
<a href="#namespaces">Namespaces</a> |
<a href="#nested-classes">Classes</a> |
<a href="#enum-members">Enumerations</a> |
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Structural Analysis and Shape Descriptors<div class="ingroups"><a class="el" href="../../d7/dbd/group__imgproc.html">Image Processing</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:d7/db8/namespacecv_1_1traits"><td align="right" class="memItemLeft" valign="top">  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/db8/namespacecv_1_1traits.html">cv::traits</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td align="right" class="memItemLeft" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/dd4/classcv_1_1GeneralizedHough.html">cv::GeneralizedHough</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">finds arbitrary template in the grayscale image using Generalized Hough Transform  <a href="../../d7/dd4/classcv_1_1GeneralizedHough.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td align="right" class="memItemLeft" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/d46/classcv_1_1GeneralizedHoughBallard.html">cv::GeneralizedHoughBallard</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">finds arbitrary template in the grayscale image using Generalized Hough Transform  <a href="../../dc/d46/classcv_1_1GeneralizedHoughBallard.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td align="right" class="memItemLeft" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d20/classcv_1_1GeneralizedHoughGuil.html">cv::GeneralizedHoughGuil</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">finds arbitrary template in the grayscale image using Generalized Hough Transform  <a href="../../d3/d20/classcv_1_1GeneralizedHoughGuil.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td align="right" class="memItemLeft" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d23/classcv_1_1Moments.html">cv::Moments</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">struct returned by <a class="el" href="../../d3/dc0/group__imgproc__shape.html#ga556a180f43cab22649c23ada36a8a139" title="Calculates all of the moments up to the third order of a polygon or rasterized shape. ">cv::moments</a>  <a href="../../d8/d23/classcv_1_1Moments.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:ga5ed7784614678adccb699c70fb841075"><td align="right" class="memItemLeft" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc0/group__imgproc__shape.html#ga5ed7784614678adccb699c70fb841075">cv::ConnectedComponentsAlgorithmsTypes</a> { <br/>
  <a class="el" href="../../d3/dc0/group__imgproc__shape.html#gga5ed7784614678adccb699c70fb841075abd210ad49e33f19f2cb8c090c11f7a4c">cv::CCL_DEFAULT</a> = -1, 
<br/>
  <a class="el" href="../../d3/dc0/group__imgproc__shape.html#gga5ed7784614678adccb699c70fb841075a612680db0d08d338109a6cd758417b66">cv::CCL_WU</a> = 0, 
<br/>
  <a class="el" href="../../d3/dc0/group__imgproc__shape.html#gga5ed7784614678adccb699c70fb841075a49eccb403b410391d5ff9048d30596f5">cv::CCL_GRANA</a> = 1, 
<br/>
  <a class="el" href="../../d3/dc0/group__imgproc__shape.html#gga5ed7784614678adccb699c70fb841075ad7f2cbf90aa4f28f8f422f61e9337afc">cv::CCL_BOLELLI</a> = 2, 
<br/>
  <a class="el" href="../../d3/dc0/group__imgproc__shape.html#gga5ed7784614678adccb699c70fb841075a30a41341a1fd1f699dc02f923a8e2eb9">cv::CCL_SAUF</a> = 3, 
<br/>
  <a class="el" href="../../d3/dc0/group__imgproc__shape.html#gga5ed7784614678adccb699c70fb841075afec1d2613b0c15b6a685a28bcf52e261">cv::CCL_BBDT</a> = 4, 
<br/>
  <a class="el" href="../../d3/dc0/group__imgproc__shape.html#gga5ed7784614678adccb699c70fb841075a9a714bb626c2706d0971089fb771d439">cv::CCL_SPAGHETTI</a> = 5
<br/>
 }<tr class="memdesc:ga5ed7784614678adccb699c70fb841075"><td class="mdescLeft"> </td><td class="mdescRight">connected components algorithm  <a href="../../d3/dc0/group__imgproc__shape.html#ga5ed7784614678adccb699c70fb841075">More...</a><br/></td></tr>
</td></tr>
<tr class="separator:ga5ed7784614678adccb699c70fb841075"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gac7099124c0390051c6970a987e7dc5c5"><td align="right" class="memItemLeft" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc0/group__imgproc__shape.html#gac7099124c0390051c6970a987e7dc5c5">cv::ConnectedComponentsTypes</a> { <br/>
  <a class="el" href="../../d3/dc0/group__imgproc__shape.html#ggac7099124c0390051c6970a987e7dc5c5a04bf79427482a254e98c546080c89479">cv::CC_STAT_LEFT</a> = 0, 
<br/>
  <a class="el" href="../../d3/dc0/group__imgproc__shape.html#ggac7099124c0390051c6970a987e7dc5c5a5dcf5ad1fb02f810023ce2d4148abb09">cv::CC_STAT_TOP</a> = 1, 
<br/>
  <a class="el" href="../../d3/dc0/group__imgproc__shape.html#ggac7099124c0390051c6970a987e7dc5c5af747c3b07668e91a316945a70adcef59">cv::CC_STAT_WIDTH</a> = 2, 
<br/>
  <a class="el" href="../../d3/dc0/group__imgproc__shape.html#ggac7099124c0390051c6970a987e7dc5c5a9b2a516b764fd4a35c8513ce0bc9c570">cv::CC_STAT_HEIGHT</a> = 3, 
<br/>
  <a class="el" href="../../d3/dc0/group__imgproc__shape.html#ggac7099124c0390051c6970a987e7dc5c5a49573cd2ef1510fd96052d94feaac901">cv::CC_STAT_AREA</a> = 4
<br/>
 }<tr class="memdesc:gac7099124c0390051c6970a987e7dc5c5"><td class="mdescLeft"> </td><td class="mdescRight">connected components statistics  <a href="../../d3/dc0/group__imgproc__shape.html#gac7099124c0390051c6970a987e7dc5c5">More...</a><br/></td></tr>
</td></tr>
<tr class="separator:gac7099124c0390051c6970a987e7dc5c5"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga4303f45752694956374734a03c54d5ff"><td align="right" class="memItemLeft" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc0/group__imgproc__shape.html#ga4303f45752694956374734a03c54d5ff">cv::ContourApproximationModes</a> { <br/>
  <a class="el" href="../../d3/dc0/group__imgproc__shape.html#gga4303f45752694956374734a03c54d5ffaf7d9a3582d021d5dadcb0e37201a62f8">cv::CHAIN_APPROX_NONE</a> = 1, 
<br/>
  <a class="el" href="../../d3/dc0/group__imgproc__shape.html#gga4303f45752694956374734a03c54d5ffa5f2883048e654999209f88ba04c302f5">cv::CHAIN_APPROX_SIMPLE</a> = 2, 
<br/>
  <a class="el" href="../../d3/dc0/group__imgproc__shape.html#gga4303f45752694956374734a03c54d5ffad29171855734b1cf69fb6653c5d1db35">cv::CHAIN_APPROX_TC89_L1</a> = 3, 
<br/>
  <a class="el" href="../../d3/dc0/group__imgproc__shape.html#gga4303f45752694956374734a03c54d5ffa867e7a9ab72c8199a60e2d595d1078a3">cv::CHAIN_APPROX_TC89_KCOS</a> = 4
<br/>
 }<tr class="memdesc:ga4303f45752694956374734a03c54d5ff"><td class="mdescLeft"> </td><td class="mdescRight">the contour approximation algorithm  <a href="../../d3/dc0/group__imgproc__shape.html#ga4303f45752694956374734a03c54d5ff">More...</a><br/></td></tr>
</td></tr>
<tr class="separator:ga4303f45752694956374734a03c54d5ff"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaaf0eb9e10bd5adcbd446cd31fea2db68"><td align="right" class="memItemLeft" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc0/group__imgproc__shape.html#gaaf0eb9e10bd5adcbd446cd31fea2db68">cv::RectanglesIntersectTypes</a> { <br/>
  <a class="el" href="../../d3/dc0/group__imgproc__shape.html#ggaaf0eb9e10bd5adcbd446cd31fea2db68a0499e05c23055c4b362b7c203ce06ea3">cv::INTERSECT_NONE</a> = 0, 
<br/>
  <a class="el" href="../../d3/dc0/group__imgproc__shape.html#ggaaf0eb9e10bd5adcbd446cd31fea2db68aba404626c7adb5e8b352a17be236a251">cv::INTERSECT_PARTIAL</a> = 1, 
<br/>
  <a class="el" href="../../d3/dc0/group__imgproc__shape.html#ggaaf0eb9e10bd5adcbd446cd31fea2db68a56ab9c9ae145e505676ed8a6d90e032d">cv::INTERSECT_FULL</a> = 2
<br/>
 }<tr class="memdesc:gaaf0eb9e10bd5adcbd446cd31fea2db68"><td class="mdescLeft"> </td><td class="mdescRight">types of intersection between rectangles  <a href="../../d3/dc0/group__imgproc__shape.html#gaaf0eb9e10bd5adcbd446cd31fea2db68">More...</a><br/></td></tr>
</td></tr>
<tr class="separator:gaaf0eb9e10bd5adcbd446cd31fea2db68"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga819779b9857cc2f8601e6526a3a5bc71"><td align="right" class="memItemLeft" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc0/group__imgproc__shape.html#ga819779b9857cc2f8601e6526a3a5bc71">cv::RetrievalModes</a> { <br/>
  <a class="el" href="../../d3/dc0/group__imgproc__shape.html#gga819779b9857cc2f8601e6526a3a5bc71aa7adc6d6608609fd84650f71b954b981">cv::RETR_EXTERNAL</a> = 0, 
<br/>
  <a class="el" href="../../d3/dc0/group__imgproc__shape.html#gga819779b9857cc2f8601e6526a3a5bc71a48b9c2cb1056f775ae50bb68288b875e">cv::RETR_LIST</a> = 1, 
<br/>
  <a class="el" href="../../d3/dc0/group__imgproc__shape.html#gga819779b9857cc2f8601e6526a3a5bc71a7d1d4b509fb2a9a8dc2f960357748752">cv::RETR_CCOMP</a> = 2, 
<br/>
  <a class="el" href="../../d3/dc0/group__imgproc__shape.html#gga819779b9857cc2f8601e6526a3a5bc71ab10df56aed56c89a026580adc9431f58">cv::RETR_TREE</a> = 3, 
<br/>
  <a class="el" href="../../d3/dc0/group__imgproc__shape.html#gga819779b9857cc2f8601e6526a3a5bc71acc80715d6a2a51855cb3a9a8093a9352">cv::RETR_FLOODFILL</a> = 4
<br/>
 }<tr class="memdesc:ga819779b9857cc2f8601e6526a3a5bc71"><td class="mdescLeft"> </td><td class="mdescRight">mode of the contour retrieval algorithm  <a href="../../d3/dc0/group__imgproc__shape.html#ga819779b9857cc2f8601e6526a3a5bc71">More...</a><br/></td></tr>
</td></tr>
<tr class="separator:ga819779b9857cc2f8601e6526a3a5bc71"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaf2b97a230b51856d09a2d934b78c015f"><td align="right" class="memItemLeft" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc0/group__imgproc__shape.html#gaf2b97a230b51856d09a2d934b78c015f">cv::ShapeMatchModes</a> { <br/>
  <a class="el" href="../../d3/dc0/group__imgproc__shape.html#ggaf2b97a230b51856d09a2d934b78c015fa73b8cbe851905080a1d918c902253dcc">cv::CONTOURS_MATCH_I1</a> =1, 
<br/>
  <a class="el" href="../../d3/dc0/group__imgproc__shape.html#ggaf2b97a230b51856d09a2d934b78c015faf511a9b06dc4776cc1ea1afe0fd5e7c1">cv::CONTOURS_MATCH_I2</a> =2, 
<br/>
  <a class="el" href="../../d3/dc0/group__imgproc__shape.html#ggaf2b97a230b51856d09a2d934b78c015fae704cd6566d3576e6083657a8ac0792a">cv::CONTOURS_MATCH_I3</a> =3
<br/>
 }<tr class="memdesc:gaf2b97a230b51856d09a2d934b78c015f"><td class="mdescLeft"> </td><td class="mdescRight">Shape matching methods.  <a href="../../d3/dc0/group__imgproc__shape.html#gaf2b97a230b51856d09a2d934b78c015f">More...</a><br/></td></tr>
</td></tr>
<tr class="separator:gaf2b97a230b51856d09a2d934b78c015f"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga0012a5fdaea70b8a9970165d98722b4c"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc0/group__imgproc__shape.html#ga0012a5fdaea70b8a9970165d98722b4c">cv::approxPolyDP</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> curve, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> approxCurve, double epsilon, bool closed)</td></tr>
<tr class="memdesc:ga0012a5fdaea70b8a9970165d98722b4c"><td class="mdescLeft"> </td><td class="mdescRight">Approximates a polygonal curve(s) with the specified precision.  <a href="../../d3/dc0/group__imgproc__shape.html#ga0012a5fdaea70b8a9970165d98722b4c">More...</a><br/></td></tr>
<tr class="separator:ga0012a5fdaea70b8a9970165d98722b4c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga8d26483c636be6b35c3ec6335798a47c"><td align="right" class="memItemLeft" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc0/group__imgproc__shape.html#ga8d26483c636be6b35c3ec6335798a47c">cv::arcLength</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> curve, bool closed)</td></tr>
<tr class="memdesc:ga8d26483c636be6b35c3ec6335798a47c"><td class="mdescLeft"> </td><td class="mdescRight">Calculates a contour perimeter or a curve length.  <a href="../../d3/dc0/group__imgproc__shape.html#ga8d26483c636be6b35c3ec6335798a47c">More...</a><br/></td></tr>
<tr class="separator:ga8d26483c636be6b35c3ec6335798a47c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga103fcbda2f540f3ef1c042d6a9b35ac7"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../dc/d84/group__core__basic.html#ga11d95de507098e90bad732b9345402e8">Rect</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc0/group__imgproc__shape.html#ga103fcbda2f540f3ef1c042d6a9b35ac7">cv::boundingRect</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> array)</td></tr>
<tr class="memdesc:ga103fcbda2f540f3ef1c042d6a9b35ac7"><td class="mdescLeft"> </td><td class="mdescRight">Calculates the up-right bounding rectangle of a point set or non-zero pixels of gray-scale image.  <a href="../../d3/dc0/group__imgproc__shape.html#ga103fcbda2f540f3ef1c042d6a9b35ac7">More...</a><br/></td></tr>
<tr class="separator:ga103fcbda2f540f3ef1c042d6a9b35ac7"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaf78d467e024b4d7936cf9397185d2f5c"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc0/group__imgproc__shape.html#gaf78d467e024b4d7936cf9397185d2f5c">cv::boxPoints</a> (<a class="el" href="../../db/dd6/classcv_1_1RotatedRect.html">RotatedRect</a> box, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> points)</td></tr>
<tr class="memdesc:gaf78d467e024b4d7936cf9397185d2f5c"><td class="mdescLeft"> </td><td class="mdescRight">Finds the four vertices of a rotated rect. Useful to draw the rotated rectangle.  <a href="../../d3/dc0/group__imgproc__shape.html#gaf78d467e024b4d7936cf9397185d2f5c">More...</a><br/></td></tr>
<tr class="separator:gaf78d467e024b4d7936cf9397185d2f5c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaedef8c7340499ca391d459122e51bef5"><td align="right" class="memItemLeft" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc0/group__imgproc__shape.html#gaedef8c7340499ca391d459122e51bef5">cv::connectedComponents</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> image, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> labels, int connectivity, int ltype, int ccltype)</td></tr>
<tr class="memdesc:gaedef8c7340499ca391d459122e51bef5"><td class="mdescLeft"> </td><td class="mdescRight">computes the connected components labeled image of boolean image  <a href="../../d3/dc0/group__imgproc__shape.html#gaedef8c7340499ca391d459122e51bef5">More...</a><br/></td></tr>
<tr class="separator:gaedef8c7340499ca391d459122e51bef5"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gac2718a64ade63475425558aa669a943a"><td align="right" class="memItemLeft" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc0/group__imgproc__shape.html#gac2718a64ade63475425558aa669a943a">cv::connectedComponents</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> image, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> labels, int connectivity=8, int ltype=<a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga4067910fc388075c3ea3aa14393e83b9">CV_32S</a>)</td></tr>
<tr class="separator:gac2718a64ade63475425558aa669a943a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga107a78bf7cd25dec05fb4dfc5c9e765f"><td align="right" class="memItemLeft" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc0/group__imgproc__shape.html#ga107a78bf7cd25dec05fb4dfc5c9e765f">cv::connectedComponentsWithStats</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> image, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> labels, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> stats, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> centroids, int connectivity, int ltype, int ccltype)</td></tr>
<tr class="memdesc:ga107a78bf7cd25dec05fb4dfc5c9e765f"><td class="mdescLeft"> </td><td class="mdescRight">computes the connected components labeled image of boolean image and also produces a statistics output for each label  <a href="../../d3/dc0/group__imgproc__shape.html#ga107a78bf7cd25dec05fb4dfc5c9e765f">More...</a><br/></td></tr>
<tr class="separator:ga107a78bf7cd25dec05fb4dfc5c9e765f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gae57b028a2b2ca327227c2399a9d53241"><td align="right" class="memItemLeft" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc0/group__imgproc__shape.html#gae57b028a2b2ca327227c2399a9d53241">cv::connectedComponentsWithStats</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> image, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> labels, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> stats, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> centroids, int connectivity=8, int ltype=<a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga4067910fc388075c3ea3aa14393e83b9">CV_32S</a>)</td></tr>
<tr class="separator:gae57b028a2b2ca327227c2399a9d53241"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga2c759ed9f497d4a618048a2f56dc97f1"><td align="right" class="memItemLeft" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc0/group__imgproc__shape.html#ga2c759ed9f497d4a618048a2f56dc97f1">cv::contourArea</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> contour, bool oriented=false)</td></tr>
<tr class="memdesc:ga2c759ed9f497d4a618048a2f56dc97f1"><td class="mdescLeft"> </td><td class="mdescRight">Calculates a contour area.  <a href="../../d3/dc0/group__imgproc__shape.html#ga2c759ed9f497d4a618048a2f56dc97f1">More...</a><br/></td></tr>
<tr class="separator:ga2c759ed9f497d4a618048a2f56dc97f1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga014b28e56cb8854c0de4a211cb2be656"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc0/group__imgproc__shape.html#ga014b28e56cb8854c0de4a211cb2be656">cv::convexHull</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> points, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> hull, bool clockwise=false, bool returnPoints=true)</td></tr>
<tr class="memdesc:ga014b28e56cb8854c0de4a211cb2be656"><td class="mdescLeft"> </td><td class="mdescRight">Finds the convex hull of a point set.  <a href="../../d3/dc0/group__imgproc__shape.html#ga014b28e56cb8854c0de4a211cb2be656">More...</a><br/></td></tr>
<tr class="separator:ga014b28e56cb8854c0de4a211cb2be656"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gada4437098113fd8683c932e0567f47ba"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc0/group__imgproc__shape.html#gada4437098113fd8683c932e0567f47ba">cv::convexityDefects</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> contour, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> convexhull, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> convexityDefects)</td></tr>
<tr class="memdesc:gada4437098113fd8683c932e0567f47ba"><td class="mdescLeft"> </td><td class="mdescRight">Finds the convexity defects of a contour.  <a href="../../d3/dc0/group__imgproc__shape.html#gada4437098113fd8683c932e0567f47ba">More...</a><br/></td></tr>
<tr class="separator:gada4437098113fd8683c932e0567f47ba"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga3252811b8a7a5f606dc0a88927982ee9"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; <a class="el" href="../../dc/d46/classcv_1_1GeneralizedHoughBallard.html">GeneralizedHoughBallard</a> &gt; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc0/group__imgproc__shape.html#ga3252811b8a7a5f606dc0a88927982ee9">cv::createGeneralizedHoughBallard</a> ()</td></tr>
<tr class="memdesc:ga3252811b8a7a5f606dc0a88927982ee9"><td class="mdescLeft"> </td><td class="mdescRight">Creates a smart pointer to a <a class="el" href="../../dc/d46/classcv_1_1GeneralizedHoughBallard.html" title="finds arbitrary template in the grayscale image using Generalized Hough Transform ...">cv::GeneralizedHoughBallard</a> class and initializes it.  <a href="../../d3/dc0/group__imgproc__shape.html#ga3252811b8a7a5f606dc0a88927982ee9">More...</a><br/></td></tr>
<tr class="separator:ga3252811b8a7a5f606dc0a88927982ee9"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gae2eb1e12452257b63d09ba9ce871f58c"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; <a class="el" href="../../d3/d20/classcv_1_1GeneralizedHoughGuil.html">GeneralizedHoughGuil</a> &gt; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc0/group__imgproc__shape.html#gae2eb1e12452257b63d09ba9ce871f58c">cv::createGeneralizedHoughGuil</a> ()</td></tr>
<tr class="memdesc:gae2eb1e12452257b63d09ba9ce871f58c"><td class="mdescLeft"> </td><td class="mdescRight">Creates a smart pointer to a <a class="el" href="../../d3/d20/classcv_1_1GeneralizedHoughGuil.html" title="finds arbitrary template in the grayscale image using Generalized Hough Transform ...">cv::GeneralizedHoughGuil</a> class and initializes it.  <a href="../../d3/dc0/group__imgproc__shape.html#gae2eb1e12452257b63d09ba9ce871f58c">More...</a><br/></td></tr>
<tr class="separator:gae2eb1e12452257b63d09ba9ce871f58c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gadf1ad6a0b82947fa1fe3c3d497f260e0"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc0/group__imgproc__shape.html#gadf1ad6a0b82947fa1fe3c3d497f260e0">cv::findContours</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> image, <a class="el" href="../../dc/d84/group__core__basic.html#ga889a09549b98223016170d9b613715de">OutputArrayOfArrays</a> contours, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> hierarchy, int mode, int method, <a class="el" href="../../dc/d84/group__core__basic.html#ga1e83eafb2d26b3c93f09e8338bcab192">Point</a> offset=<a class="el" href="../../dc/d84/group__core__basic.html#ga1e83eafb2d26b3c93f09e8338bcab192">Point</a>())</td></tr>
<tr class="memdesc:gadf1ad6a0b82947fa1fe3c3d497f260e0"><td class="mdescLeft"> </td><td class="mdescRight">Finds contours in a binary image.  <a href="../../d3/dc0/group__imgproc__shape.html#gadf1ad6a0b82947fa1fe3c3d497f260e0">More...</a><br/></td></tr>
<tr class="separator:gadf1ad6a0b82947fa1fe3c3d497f260e0"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gae4156f04053c44f886e387cff0ef6e08"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc0/group__imgproc__shape.html#gae4156f04053c44f886e387cff0ef6e08">cv::findContours</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> image, <a class="el" href="../../dc/d84/group__core__basic.html#ga889a09549b98223016170d9b613715de">OutputArrayOfArrays</a> contours, int mode, int method, <a class="el" href="../../dc/d84/group__core__basic.html#ga1e83eafb2d26b3c93f09e8338bcab192">Point</a> offset=<a class="el" href="../../dc/d84/group__core__basic.html#ga1e83eafb2d26b3c93f09e8338bcab192">Point</a>())</td></tr>
<tr class="separator:gae4156f04053c44f886e387cff0ef6e08"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaf259efaad93098103d6c27b9e4900ffa"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../db/dd6/classcv_1_1RotatedRect.html">RotatedRect</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc0/group__imgproc__shape.html#gaf259efaad93098103d6c27b9e4900ffa">cv::fitEllipse</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> points)</td></tr>
<tr class="memdesc:gaf259efaad93098103d6c27b9e4900ffa"><td class="mdescLeft"> </td><td class="mdescRight">Fits an ellipse around a set of 2D points.  <a href="../../d3/dc0/group__imgproc__shape.html#gaf259efaad93098103d6c27b9e4900ffa">More...</a><br/></td></tr>
<tr class="separator:gaf259efaad93098103d6c27b9e4900ffa"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga69e90cda55c4e192a8caa0b99c3e4550"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../db/dd6/classcv_1_1RotatedRect.html">RotatedRect</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc0/group__imgproc__shape.html#ga69e90cda55c4e192a8caa0b99c3e4550">cv::fitEllipseAMS</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> points)</td></tr>
<tr class="memdesc:ga69e90cda55c4e192a8caa0b99c3e4550"><td class="mdescLeft"> </td><td class="mdescRight">Fits an ellipse around a set of 2D points.  <a href="../../d3/dc0/group__imgproc__shape.html#ga69e90cda55c4e192a8caa0b99c3e4550">More...</a><br/></td></tr>
<tr class="separator:ga69e90cda55c4e192a8caa0b99c3e4550"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga6421884fd411923a74891998bbe9e813"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../db/dd6/classcv_1_1RotatedRect.html">RotatedRect</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc0/group__imgproc__shape.html#ga6421884fd411923a74891998bbe9e813">cv::fitEllipseDirect</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> points)</td></tr>
<tr class="memdesc:ga6421884fd411923a74891998bbe9e813"><td class="mdescLeft"> </td><td class="mdescRight">Fits an ellipse around a set of 2D points.  <a href="../../d3/dc0/group__imgproc__shape.html#ga6421884fd411923a74891998bbe9e813">More...</a><br/></td></tr>
<tr class="separator:ga6421884fd411923a74891998bbe9e813"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaf849da1fdafa67ee84b1e9a23b93f91f"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc0/group__imgproc__shape.html#gaf849da1fdafa67ee84b1e9a23b93f91f">cv::fitLine</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> points, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> <a class="el" href="../../d6/d6e/group__imgproc__draw.html#ga7078a9fae8c7e7d13d24dac2520ae4a2">line</a>, int distType, double param, double reps, double aeps)</td></tr>
<tr class="memdesc:gaf849da1fdafa67ee84b1e9a23b93f91f"><td class="mdescLeft"> </td><td class="mdescRight">Fits a line to a 2D or 3D point set.  <a href="../../d3/dc0/group__imgproc__shape.html#gaf849da1fdafa67ee84b1e9a23b93f91f">More...</a><br/></td></tr>
<tr class="separator:gaf849da1fdafa67ee84b1e9a23b93f91f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gab001db45c1f1af6cbdbe64df04c4e944"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc0/group__imgproc__shape.html#gab001db45c1f1af6cbdbe64df04c4e944">cv::HuMoments</a> (const <a class="el" href="../../d8/d23/classcv_1_1Moments.html">Moments</a> &amp;<a class="el" href="../../d3/dc0/group__imgproc__shape.html#ga556a180f43cab22649c23ada36a8a139">moments</a>, double hu[7])</td></tr>
<tr class="memdesc:gab001db45c1f1af6cbdbe64df04c4e944"><td class="mdescLeft"> </td><td class="mdescRight">Calculates seven Hu invariants.  <a href="../../d3/dc0/group__imgproc__shape.html#gab001db45c1f1af6cbdbe64df04c4e944">More...</a><br/></td></tr>
<tr class="separator:gab001db45c1f1af6cbdbe64df04c4e944"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga6d6ac1b519cba25190119afe3a52c1cc"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc0/group__imgproc__shape.html#ga6d6ac1b519cba25190119afe3a52c1cc">cv::HuMoments</a> (const <a class="el" href="../../d8/d23/classcv_1_1Moments.html">Moments</a> &amp;m, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> hu)</td></tr>
<tr class="separator:ga6d6ac1b519cba25190119afe3a52c1cc"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga8e840f3f3695613d32c052bec89e782c"><td align="right" class="memItemLeft" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc0/group__imgproc__shape.html#ga8e840f3f3695613d32c052bec89e782c">cv::intersectConvexConvex</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> _p1, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> _p2, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> _p12, bool handleNested=true)</td></tr>
<tr class="memdesc:ga8e840f3f3695613d32c052bec89e782c"><td class="mdescLeft"> </td><td class="mdescRight">Finds intersection of two convex polygons.  <a href="../../d3/dc0/group__imgproc__shape.html#ga8e840f3f3695613d32c052bec89e782c">More...</a><br/></td></tr>
<tr class="separator:ga8e840f3f3695613d32c052bec89e782c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga8abf8010377b58cbc16db6734d92941b"><td align="right" class="memItemLeft" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc0/group__imgproc__shape.html#ga8abf8010377b58cbc16db6734d92941b">cv::isContourConvex</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> contour)</td></tr>
<tr class="memdesc:ga8abf8010377b58cbc16db6734d92941b"><td class="mdescLeft"> </td><td class="mdescRight">Tests a contour convexity.  <a href="../../d3/dc0/group__imgproc__shape.html#ga8abf8010377b58cbc16db6734d92941b">More...</a><br/></td></tr>
<tr class="separator:ga8abf8010377b58cbc16db6734d92941b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaadc90cb16e2362c9bd6e7363e6e4c317"><td align="right" class="memItemLeft" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc0/group__imgproc__shape.html#gaadc90cb16e2362c9bd6e7363e6e4c317">cv::matchShapes</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> contour1, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> contour2, int method, double parameter)</td></tr>
<tr class="memdesc:gaadc90cb16e2362c9bd6e7363e6e4c317"><td class="mdescLeft"> </td><td class="mdescRight">Compares two shapes.  <a href="../../d3/dc0/group__imgproc__shape.html#gaadc90cb16e2362c9bd6e7363e6e4c317">More...</a><br/></td></tr>
<tr class="separator:gaadc90cb16e2362c9bd6e7363e6e4c317"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga3d476a3417130ae5154aea421ca7ead9"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../db/dd6/classcv_1_1RotatedRect.html">RotatedRect</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc0/group__imgproc__shape.html#ga3d476a3417130ae5154aea421ca7ead9">cv::minAreaRect</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> points)</td></tr>
<tr class="memdesc:ga3d476a3417130ae5154aea421ca7ead9"><td class="mdescLeft"> </td><td class="mdescRight">Finds a rotated rectangle of the minimum area enclosing the input 2D point set.  <a href="../../d3/dc0/group__imgproc__shape.html#ga3d476a3417130ae5154aea421ca7ead9">More...</a><br/></td></tr>
<tr class="separator:ga3d476a3417130ae5154aea421ca7ead9"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga8ce13c24081bbc7151e9326f412190f1"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc0/group__imgproc__shape.html#ga8ce13c24081bbc7151e9326f412190f1">cv::minEnclosingCircle</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> points, <a class="el" href="../../dc/d84/group__core__basic.html#ga7d080aa40de011e4410bca63385ffe2a">Point2f</a> &amp;center, float &amp;radius)</td></tr>
<tr class="memdesc:ga8ce13c24081bbc7151e9326f412190f1"><td class="mdescLeft"> </td><td class="mdescRight">Finds a circle of the minimum area enclosing a 2D point set.  <a href="../../d3/dc0/group__imgproc__shape.html#ga8ce13c24081bbc7151e9326f412190f1">More...</a><br/></td></tr>
<tr class="separator:ga8ce13c24081bbc7151e9326f412190f1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga1513e72f6bbdfc370563664f71e0542f"><td align="right" class="memItemLeft" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc0/group__imgproc__shape.html#ga1513e72f6bbdfc370563664f71e0542f">cv::minEnclosingTriangle</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> points, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> triangle)</td></tr>
<tr class="memdesc:ga1513e72f6bbdfc370563664f71e0542f"><td class="mdescLeft"> </td><td class="mdescRight">Finds a triangle of minimum area enclosing a 2D point set and returns its area.  <a href="../../d3/dc0/group__imgproc__shape.html#ga1513e72f6bbdfc370563664f71e0542f">More...</a><br/></td></tr>
<tr class="separator:ga1513e72f6bbdfc370563664f71e0542f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga556a180f43cab22649c23ada36a8a139"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d8/d23/classcv_1_1Moments.html">Moments</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc0/group__imgproc__shape.html#ga556a180f43cab22649c23ada36a8a139">cv::moments</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> array, bool binaryImage=false)</td></tr>
<tr class="memdesc:ga556a180f43cab22649c23ada36a8a139"><td class="mdescLeft"> </td><td class="mdescRight">Calculates all of the moments up to the third order of a polygon or rasterized shape.  <a href="../../d3/dc0/group__imgproc__shape.html#ga556a180f43cab22649c23ada36a8a139">More...</a><br/></td></tr>
<tr class="separator:ga556a180f43cab22649c23ada36a8a139"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga1a539e8db2135af2566103705d7a5722"><td align="right" class="memItemLeft" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc0/group__imgproc__shape.html#ga1a539e8db2135af2566103705d7a5722">cv::pointPolygonTest</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> contour, <a class="el" href="../../dc/d84/group__core__basic.html#ga7d080aa40de011e4410bca63385ffe2a">Point2f</a> pt, bool measureDist)</td></tr>
<tr class="memdesc:ga1a539e8db2135af2566103705d7a5722"><td class="mdescLeft"> </td><td class="mdescRight">Performs a point-in-contour test.  <a href="../../d3/dc0/group__imgproc__shape.html#ga1a539e8db2135af2566103705d7a5722">More...</a><br/></td></tr>
<tr class="separator:ga1a539e8db2135af2566103705d7a5722"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga8740e7645628c59d238b0b22c2abe2d4"><td align="right" class="memItemLeft" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dc0/group__imgproc__shape.html#ga8740e7645628c59d238b0b22c2abe2d4">cv::rotatedRectangleIntersection</a> (const <a class="el" href="../../db/dd6/classcv_1_1RotatedRect.html">RotatedRect</a> &amp;rect1, const <a class="el" href="../../db/dd6/classcv_1_1RotatedRect.html">RotatedRect</a> &amp;rect2, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> intersectingRegion)</td></tr>
<tr class="memdesc:ga8740e7645628c59d238b0b22c2abe2d4"><td class="mdescLeft"> </td><td class="mdescRight">Finds out if there is any intersection between two rotated rectangles.  <a href="../../d3/dc0/group__imgproc__shape.html#ga8740e7645628c59d238b0b22c2abe2d4">More...</a><br/></td></tr>
<tr class="separator:ga8740e7645628c59d238b0b22c2abe2d4"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a id="details" name="details"></a><h2 class="groupheader">Detailed Description</h2>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="ga5ed7784614678adccb699c70fb841075"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5ed7784614678adccb699c70fb841075">◆ </a></span>ConnectedComponentsAlgorithmsTypes</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="../../d3/dc0/group__imgproc__shape.html#ga5ed7784614678adccb699c70fb841075">cv::ConnectedComponentsAlgorithmsTypes</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d1/d4f/imgproc_2include_2opencv2_2imgproc_8hpp.html">opencv2/imgproc.hpp</a>&gt;</code></p>
<p>connected components algorithm </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga5ed7784614678adccb699c70fb841075abd210ad49e33f19f2cb8c090c11f7a4c"></a>CCL_DEFAULT <div class="python_language">Python: cv.CCL_DEFAULT</div></td><td class="fielddoc"><p>BBDT <a class="el" href="../../d0/de3/citelist.html#CITEREF_Grana2010">[96]</a> algorithm for 8-way connectivity, SAUF algorithm for 4-way connectivity. The parallel implementation described in <a class="el" href="../../d0/de3/citelist.html#CITEREF_Bolelli2017">[25]</a> is available for both BBDT and SAUF. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga5ed7784614678adccb699c70fb841075a612680db0d08d338109a6cd758417b66"></a>CCL_WU <div class="python_language">Python: cv.CCL_WU</div></td><td class="fielddoc"><p>SAUF <a class="el" href="../../d0/de3/citelist.html#CITEREF_Wu2009">[276]</a> algorithm for 8-way connectivity, SAUF algorithm for 4-way connectivity. The parallel implementation described in <a class="el" href="../../d0/de3/citelist.html#CITEREF_Bolelli2017">[25]</a> is available for SAUF. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga5ed7784614678adccb699c70fb841075a49eccb403b410391d5ff9048d30596f5"></a>CCL_GRANA <div class="python_language">Python: cv.CCL_GRANA</div></td><td class="fielddoc"><p>BBDT <a class="el" href="../../d0/de3/citelist.html#CITEREF_Grana2010">[96]</a> algorithm for 8-way connectivity, SAUF algorithm for 4-way connectivity. The parallel implementation described in <a class="el" href="../../d0/de3/citelist.html#CITEREF_Bolelli2017">[25]</a> is available for both BBDT and SAUF. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga5ed7784614678adccb699c70fb841075ad7f2cbf90aa4f28f8f422f61e9337afc"></a>CCL_BOLELLI <div class="python_language">Python: cv.CCL_BOLELLI</div></td><td class="fielddoc"><p>Spaghetti <a class="el" href="../../d0/de3/citelist.html#CITEREF_Bolelli2019">[26]</a> algorithm for 8-way connectivity, SAUF algorithm for 4-way connectivity. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga5ed7784614678adccb699c70fb841075a30a41341a1fd1f699dc02f923a8e2eb9"></a>CCL_SAUF <div class="python_language">Python: cv.CCL_SAUF</div></td><td class="fielddoc"><p>Same as CCL_WU. It is preferable to use the flag with the name of the algorithm (CCL_SAUF) rather than the one with the name of the first author (CCL_WU). </p>
</td></tr>
<tr><td class="fieldname"><a id="gga5ed7784614678adccb699c70fb841075afec1d2613b0c15b6a685a28bcf52e261"></a>CCL_BBDT <div class="python_language">Python: cv.CCL_BBDT</div></td><td class="fielddoc"><p>Same as CCL_GRANA. It is preferable to use the flag with the name of the algorithm (CCL_BBDT) rather than the one with the name of the first author (CCL_GRANA). </p>
</td></tr>
<tr><td class="fieldname"><a id="gga5ed7784614678adccb699c70fb841075a9a714bb626c2706d0971089fb771d439"></a>CCL_SPAGHETTI <div class="python_language">Python: cv.CCL_SPAGHETTI</div></td><td class="fielddoc"><p>Same as CCL_BOLELLI. It is preferable to use the flag with the name of the algorithm (CCL_SPAGHETTI) rather than the one with the name of the first author (CCL_BOLELLI). </p>
</td></tr>
</table>
</div>
</div>
<a id="gac7099124c0390051c6970a987e7dc5c5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac7099124c0390051c6970a987e7dc5c5">◆ </a></span>ConnectedComponentsTypes</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="../../d3/dc0/group__imgproc__shape.html#gac7099124c0390051c6970a987e7dc5c5">cv::ConnectedComponentsTypes</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d1/d4f/imgproc_2include_2opencv2_2imgproc_8hpp.html">opencv2/imgproc.hpp</a>&gt;</code></p>
<p>connected components statistics </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="ggac7099124c0390051c6970a987e7dc5c5a04bf79427482a254e98c546080c89479"></a>CC_STAT_LEFT <div class="python_language">Python: cv.CC_STAT_LEFT</div></td><td class="fielddoc"><p>The leftmost (x) coordinate which is the inclusive start of the bounding box in the horizontal direction. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggac7099124c0390051c6970a987e7dc5c5a5dcf5ad1fb02f810023ce2d4148abb09"></a>CC_STAT_TOP <div class="python_language">Python: cv.CC_STAT_TOP</div></td><td class="fielddoc"><p>The topmost (y) coordinate which is the inclusive start of the bounding box in the vertical direction. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggac7099124c0390051c6970a987e7dc5c5af747c3b07668e91a316945a70adcef59"></a>CC_STAT_WIDTH <div class="python_language">Python: cv.CC_STAT_WIDTH</div></td><td class="fielddoc"><p>The horizontal size of the bounding box. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggac7099124c0390051c6970a987e7dc5c5a9b2a516b764fd4a35c8513ce0bc9c570"></a>CC_STAT_HEIGHT <div class="python_language">Python: cv.CC_STAT_HEIGHT</div></td><td class="fielddoc"><p>The vertical size of the bounding box. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggac7099124c0390051c6970a987e7dc5c5a49573cd2ef1510fd96052d94feaac901"></a>CC_STAT_AREA <div class="python_language">Python: cv.CC_STAT_AREA</div></td><td class="fielddoc"><p>The total area (in pixels) of the connected component. </p>
</td></tr>
</table>
</div>
</div>
<a id="ga4303f45752694956374734a03c54d5ff"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4303f45752694956374734a03c54d5ff">◆ </a></span>ContourApproximationModes</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="../../d3/dc0/group__imgproc__shape.html#ga4303f45752694956374734a03c54d5ff">cv::ContourApproximationModes</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d1/d4f/imgproc_2include_2opencv2_2imgproc_8hpp.html">opencv2/imgproc.hpp</a>&gt;</code></p>
<p>the contour approximation algorithm </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga4303f45752694956374734a03c54d5ffaf7d9a3582d021d5dadcb0e37201a62f8"></a>CHAIN_APPROX_NONE <div class="python_language">Python: cv.CHAIN_APPROX_NONE</div></td><td class="fielddoc"><p>stores absolutely all the contour points. That is, any 2 subsequent points (x1,y1) and (x2,y2) of the contour will be either horizontal, vertical or diagonal neighbors, that is, max(abs(x1-x2),abs(y2-y1))==1. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga4303f45752694956374734a03c54d5ffa5f2883048e654999209f88ba04c302f5"></a>CHAIN_APPROX_SIMPLE <div class="python_language">Python: cv.CHAIN_APPROX_SIMPLE</div></td><td class="fielddoc"><p>compresses horizontal, vertical, and diagonal segments and leaves only their end points. For example, an up-right rectangular contour is encoded with 4 points. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga4303f45752694956374734a03c54d5ffad29171855734b1cf69fb6653c5d1db35"></a>CHAIN_APPROX_TC89_L1 <div class="python_language">Python: cv.CHAIN_APPROX_TC89_L1</div></td><td class="fielddoc"><p>applies one of the flavors of the Teh-Chin chain approximation algorithm <a class="el" href="../../d0/de3/citelist.html#CITEREF_TehChin89">[242]</a> </p>
</td></tr>
<tr><td class="fieldname"><a id="gga4303f45752694956374734a03c54d5ffa867e7a9ab72c8199a60e2d595d1078a3"></a>CHAIN_APPROX_TC89_KCOS <div class="python_language">Python: cv.CHAIN_APPROX_TC89_KCOS</div></td><td class="fielddoc"><p>applies one of the flavors of the Teh-Chin chain approximation algorithm <a class="el" href="../../d0/de3/citelist.html#CITEREF_TehChin89">[242]</a> </p>
</td></tr>
</table>
</div>
</div>
<a id="gaaf0eb9e10bd5adcbd446cd31fea2db68"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaaf0eb9e10bd5adcbd446cd31fea2db68">◆ </a></span>RectanglesIntersectTypes</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="../../d3/dc0/group__imgproc__shape.html#gaaf0eb9e10bd5adcbd446cd31fea2db68">cv::RectanglesIntersectTypes</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d1/d4f/imgproc_2include_2opencv2_2imgproc_8hpp.html">opencv2/imgproc.hpp</a>&gt;</code></p>
<p>types of intersection between rectangles </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="ggaaf0eb9e10bd5adcbd446cd31fea2db68a0499e05c23055c4b362b7c203ce06ea3"></a>INTERSECT_NONE <div class="python_language">Python: cv.INTERSECT_NONE</div></td><td class="fielddoc"><p>No intersection. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggaaf0eb9e10bd5adcbd446cd31fea2db68aba404626c7adb5e8b352a17be236a251"></a>INTERSECT_PARTIAL <div class="python_language">Python: cv.INTERSECT_PARTIAL</div></td><td class="fielddoc"><p>There is a partial intersection. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggaaf0eb9e10bd5adcbd446cd31fea2db68a56ab9c9ae145e505676ed8a6d90e032d"></a>INTERSECT_FULL <div class="python_language">Python: cv.INTERSECT_FULL</div></td><td class="fielddoc"><p>One of the rectangle is fully enclosed in the other. </p>
</td></tr>
</table>
</div>
</div>
<a id="ga819779b9857cc2f8601e6526a3a5bc71"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga819779b9857cc2f8601e6526a3a5bc71">◆ </a></span>RetrievalModes</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="../../d3/dc0/group__imgproc__shape.html#ga819779b9857cc2f8601e6526a3a5bc71">cv::RetrievalModes</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d1/d4f/imgproc_2include_2opencv2_2imgproc_8hpp.html">opencv2/imgproc.hpp</a>&gt;</code></p>
<p>mode of the contour retrieval algorithm </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga819779b9857cc2f8601e6526a3a5bc71aa7adc6d6608609fd84650f71b954b981"></a>RETR_EXTERNAL <div class="python_language">Python: cv.RETR_EXTERNAL</div></td><td class="fielddoc"><p>retrieves only the extreme outer contours. It sets <code>hierarchy[i][2]=hierarchy[i][3]=-1</code> for all the contours. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga819779b9857cc2f8601e6526a3a5bc71a48b9c2cb1056f775ae50bb68288b875e"></a>RETR_LIST <div class="python_language">Python: cv.RETR_LIST</div></td><td class="fielddoc"><p>retrieves all of the contours without establishing any hierarchical relationships. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga819779b9857cc2f8601e6526a3a5bc71a7d1d4b509fb2a9a8dc2f960357748752"></a>RETR_CCOMP <div class="python_language">Python: cv.RETR_CCOMP</div></td><td class="fielddoc"><p>retrieves all of the contours and organizes them into a two-level hierarchy. At the top level, there are external boundaries of the components. At the second level, there are boundaries of the holes. If there is another contour inside a hole of a connected component, it is still put at the top level. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga819779b9857cc2f8601e6526a3a5bc71ab10df56aed56c89a026580adc9431f58"></a>RETR_TREE <div class="python_language">Python: cv.RETR_TREE</div></td><td class="fielddoc"><p>retrieves all of the contours and reconstructs a full hierarchy of nested contours. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga819779b9857cc2f8601e6526a3a5bc71acc80715d6a2a51855cb3a9a8093a9352"></a>RETR_FLOODFILL <div class="python_language">Python: cv.RETR_FLOODFILL</div></td><td class="fielddoc"></td></tr>
</table>
</div>
</div>
<a id="gaf2b97a230b51856d09a2d934b78c015f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf2b97a230b51856d09a2d934b78c015f">◆ </a></span>ShapeMatchModes</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="../../d3/dc0/group__imgproc__shape.html#gaf2b97a230b51856d09a2d934b78c015f">cv::ShapeMatchModes</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d1/d4f/imgproc_2include_2opencv2_2imgproc_8hpp.html">opencv2/imgproc.hpp</a>&gt;</code></p>
<p>Shape matching methods. </p>
<p>\(A\) denotes object1, \(B\) denotes object2</p>
<p>\(\begin{array}{l} m^A_i = \mathrm{sign} (h^A_i) \cdot \log{h^A_i} \\ m^B_i = \mathrm{sign} (h^B_i) \cdot \log{h^B_i} \end{array}\)</p>
<p>and \(h^A_i, h^B_i\) are the Hu moments of \(A\) and \(B\) , respectively. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="ggaf2b97a230b51856d09a2d934b78c015fa73b8cbe851905080a1d918c902253dcc"></a>CONTOURS_MATCH_I1 <div class="python_language">Python: cv.CONTOURS_MATCH_I1</div></td><td class="fielddoc"><p class="formulaDsp">
\[I_1(A,B) = \sum _{i=1...7} \left | \frac{1}{m^A_i} - \frac{1}{m^B_i} \right |\]
</p>
 </td></tr>
<tr><td class="fieldname"><a id="ggaf2b97a230b51856d09a2d934b78c015faf511a9b06dc4776cc1ea1afe0fd5e7c1"></a>CONTOURS_MATCH_I2 <div class="python_language">Python: cv.CONTOURS_MATCH_I2</div></td><td class="fielddoc"><p class="formulaDsp">
\[I_2(A,B) = \sum _{i=1...7} \left | m^A_i - m^B_i \right |\]
</p>
 </td></tr>
<tr><td class="fieldname"><a id="ggaf2b97a230b51856d09a2d934b78c015fae704cd6566d3576e6083657a8ac0792a"></a>CONTOURS_MATCH_I3 <div class="python_language">Python: cv.CONTOURS_MATCH_I3</div></td><td class="fielddoc"><p class="formulaDsp">
\[I_3(A,B) = \max _{i=1...7} \frac{ \left| m^A_i - m^B_i \right| }{ \left| m^A_i \right| }\]
</p>
 </td></tr>
</table>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga0012a5fdaea70b8a9970165d98722b4c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0012a5fdaea70b8a9970165d98722b4c">◆ </a></span>approxPolyDP()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::approxPolyDP </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>curve</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>approxCurve</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double </td>
          <td class="paramname"><em>epsilon</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool </td>
          <td class="paramname"><em>closed</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>approxCurve</td><td>=</td><td>cv.approxPolyDP(</td><td class="paramname">curve, epsilon, closed[, approxCurve]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d1/d4f/imgproc_2include_2opencv2_2imgproc_8hpp.html">opencv2/imgproc.hpp</a>&gt;</code></p>
<p>Approximates a polygonal curve(s) with the specified precision. </p>
<p>The function <a class="el" href="../../d3/dc0/group__imgproc__shape.html#ga0012a5fdaea70b8a9970165d98722b4c" title="Approximates a polygonal curve(s) with the specified precision. ">cv::approxPolyDP</a> approximates a curve or a polygon with another curve/polygon with less vertices so that the distance between them is less or equal to the specified precision. It uses the Douglas-Peucker algorithm <a href="http://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm">http://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm</a></p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">curve</td><td>Input vector of a 2D point stored in std::vector or <a class="el" href="../../d3/d63/classcv_1_1Mat.html" title="n-dimensional dense array class ">Mat</a> </td></tr>
    <tr><td class="paramname">approxCurve</td><td>Result of the approximation. The type should match the type of the input curve. </td></tr>
    <tr><td class="paramname">epsilon</td><td>Parameter specifying the approximation accuracy. This is the maximum distance between the original curve and its approximation. </td></tr>
    <tr><td class="paramname">closed</td><td>If true, the approximated curve is closed (its first and last vertices are connected). Otherwise, it is not closed. </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../da/d32/samples_2cpp_2contours2_8cpp-example.html#a24">samples/cpp/contours2.cpp</a>, <a class="el" href="../../db/d00/samples_2cpp_2squares_8cpp-example.html#a20">samples/cpp/squares.cpp</a>, and <a class="el" href="../../de/dc0/samples_2tapi_2squares_8cpp-example.html#a21">samples/tapi/squares.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="ga8d26483c636be6b35c3ec6335798a47c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8d26483c636be6b35c3ec6335798a47c">◆ </a></span>arcLength()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double cv::arcLength </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>curve</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool </td>
          <td class="paramname"><em>closed</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.arcLength(</td><td class="paramname">curve, closed</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d1/d4f/imgproc_2include_2opencv2_2imgproc_8hpp.html">opencv2/imgproc.hpp</a>&gt;</code></p>
<p>Calculates a contour perimeter or a curve length. </p>
<p>The function computes a curve length or a closed contour perimeter.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">curve</td><td>Input vector of 2D points, stored in std::vector or <a class="el" href="../../d3/d63/classcv_1_1Mat.html" title="n-dimensional dense array class ">Mat</a>. </td></tr>
    <tr><td class="paramname">closed</td><td>Flag indicating whether the curve is closed or not. </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../db/d00/samples_2cpp_2squares_8cpp-example.html#a21">samples/cpp/squares.cpp</a>, and <a class="el" href="../../de/dc0/samples_2tapi_2squares_8cpp-example.html#a22">samples/tapi/squares.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="ga103fcbda2f540f3ef1c042d6a9b35ac7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga103fcbda2f540f3ef1c042d6a9b35ac7">◆ </a></span>boundingRect()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../dc/d84/group__core__basic.html#ga11d95de507098e90bad732b9345402e8">Rect</a> cv::boundingRect </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>array</em></td><td>)</td>
          <td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.boundingRect(</td><td class="paramname">array</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d1/d4f/imgproc_2include_2opencv2_2imgproc_8hpp.html">opencv2/imgproc.hpp</a>&gt;</code></p>
<p>Calculates the up-right bounding rectangle of a point set or non-zero pixels of gray-scale image. </p>
<p>The function calculates and returns the minimal up-right bounding rectangle for the specified point set or non-zero pixels of gray-scale image.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">array</td><td>Input gray-scale image or 2D point set, stored in std::vector or <a class="el" href="../../d3/d63/classcv_1_1Mat.html" title="n-dimensional dense array class ">Mat</a>. </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="gaf78d467e024b4d7936cf9397185d2f5c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf78d467e024b4d7936cf9397185d2f5c">◆ </a></span>boxPoints()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::boxPoints </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../db/dd6/classcv_1_1RotatedRect.html">RotatedRect</a> </td>
          <td class="paramname"><em>box</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>points</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>points</td><td>=</td><td>cv.boxPoints(</td><td class="paramname">box[, points]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d1/d4f/imgproc_2include_2opencv2_2imgproc_8hpp.html">opencv2/imgproc.hpp</a>&gt;</code></p>
<p>Finds the four vertices of a rotated rect. Useful to draw the rotated rectangle. </p>
<p>The function finds the four vertices of a rotated rectangle. This function is useful to draw the rectangle. In C++, instead of using this function, you can directly use <a class="el" href="../../db/dd6/classcv_1_1RotatedRect.html#a69d648b086f26dbce0029facae9bfb2d">RotatedRect::points</a> method. Please visit the <a class="el" href="../../de/d62/tutorial_bounding_rotated_ellipses.html">tutorial on Creating Bounding rotated boxes and ellipses for contours</a> for more information.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">box</td><td>The input rotated rectangle. It may be the output of </td></tr>
    <tr><td class="paramname">points</td><td>The output array of four vertices of rectangles. </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="gaedef8c7340499ca391d459122e51bef5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaedef8c7340499ca391d459122e51bef5">◆ </a></span>connectedComponents() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int cv::connectedComponents </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>image</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>labels</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>connectivity</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>ltype</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>ccltype</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval, labels</td><td>=</td><td>cv.connectedComponents(</td><td class="paramname">image[, labels[, connectivity[, ltype]]]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>retval, labels</td><td>=</td><td>cv.connectedComponentsWithAlgorithm(</td><td class="paramname">image, connectivity, ltype, ccltype[, labels]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d1/d4f/imgproc_2include_2opencv2_2imgproc_8hpp.html">opencv2/imgproc.hpp</a>&gt;</code></p>
<p>computes the connected components labeled image of boolean image </p>
<p>image with 4 or 8 way connectivity - returns N, the total number of labels [0, N-1] where 0 represents the background label. ltype specifies the output label image type, an important consideration based on the total number of labels or alternatively the total number of pixels in the source image. ccltype specifies the connected components labeling algorithm to use, currently Grana (BBDT) and Wu's (SAUF) <a class="el" href="../../d0/de3/citelist.html#CITEREF_Wu2009">[276]</a> algorithms are supported, see the <a class="el" href="../../d3/dc0/group__imgproc__shape.html#ga5ed7784614678adccb699c70fb841075" title="connected components algorithm ">ConnectedComponentsAlgorithmsTypes</a> for details. Note that SAUF algorithm forces a row major ordering of labels while BBDT does not. This function uses parallel version of both Grana and Wu's algorithms if at least one allowed parallel framework is enabled and if the rows of the image are at least twice the number returned by <a class="el" href="../../db/de0/group__core__utils.html#gadf09fc982bf4f17bc84bd1abce5d0863" title="Returns the number of logical CPUs available for the process. ">getNumberOfCPUs</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">image</td><td>the 8-bit single-channel image to be labeled </td></tr>
    <tr><td class="paramname">labels</td><td>destination labeled image </td></tr>
    <tr><td class="paramname">connectivity</td><td>8 or 4 for 8-way or 4-way connectivity respectively </td></tr>
    <tr><td class="paramname">ltype</td><td>output image label type. Currently CV_32S and CV_16U are supported. </td></tr>
    <tr><td class="paramname">ccltype</td><td>connected components algorithm type (see the <a class="el" href="../../d3/dc0/group__imgproc__shape.html#ga5ed7784614678adccb699c70fb841075" title="connected components algorithm ">ConnectedComponentsAlgorithmsTypes</a>). </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../de/d01/samples_2cpp_2connected_components_8cpp-example.html#a3">samples/cpp/connected_components.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="gac2718a64ade63475425558aa669a943a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac2718a64ade63475425558aa669a943a">◆ </a></span>connectedComponents() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int cv::connectedComponents </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>image</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>labels</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>connectivity</em> = <code>8</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>ltype</em> = <code><a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga4067910fc388075c3ea3aa14393e83b9">CV_32S</a></code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval, labels</td><td>=</td><td>cv.connectedComponents(</td><td class="paramname">image[, labels[, connectivity[, ltype]]]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>retval, labels</td><td>=</td><td>cv.connectedComponentsWithAlgorithm(</td><td class="paramname">image, connectivity, ltype, ccltype[, labels]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d1/d4f/imgproc_2include_2opencv2_2imgproc_8hpp.html">opencv2/imgproc.hpp</a>&gt;</code></p>
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">image</td><td>the 8-bit single-channel image to be labeled </td></tr>
    <tr><td class="paramname">labels</td><td>destination labeled image </td></tr>
    <tr><td class="paramname">connectivity</td><td>8 or 4 for 8-way or 4-way connectivity respectively </td></tr>
    <tr><td class="paramname">ltype</td><td>output image label type. Currently CV_32S and CV_16U are supported. </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="ga107a78bf7cd25dec05fb4dfc5c9e765f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga107a78bf7cd25dec05fb4dfc5c9e765f">◆ </a></span>connectedComponentsWithStats() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int cv::connectedComponentsWithStats </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>image</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>labels</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>stats</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>centroids</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>connectivity</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>ltype</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>ccltype</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval, labels, stats, centroids</td><td>=</td><td>cv.connectedComponentsWithStats(</td><td class="paramname">image[, labels[, stats[, centroids[, connectivity[, ltype]]]]]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>retval, labels, stats, centroids</td><td>=</td><td>cv.connectedComponentsWithStatsWithAlgorithm(</td><td class="paramname">image, connectivity, ltype, ccltype[, labels[, stats[, centroids]]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d1/d4f/imgproc_2include_2opencv2_2imgproc_8hpp.html">opencv2/imgproc.hpp</a>&gt;</code></p>
<p>computes the connected components labeled image of boolean image and also produces a statistics output for each label </p>
<p>image with 4 or 8 way connectivity - returns N, the total number of labels [0, N-1] where 0 represents the background label. ltype specifies the output label image type, an important consideration based on the total number of labels or alternatively the total number of pixels in the source image. ccltype specifies the connected components labeling algorithm to use, currently Grana's (BBDT) and Wu's (SAUF) <a class="el" href="../../d0/de3/citelist.html#CITEREF_Wu2009">[276]</a> algorithms are supported, see the <a class="el" href="../../d3/dc0/group__imgproc__shape.html#ga5ed7784614678adccb699c70fb841075" title="connected components algorithm ">ConnectedComponentsAlgorithmsTypes</a> for details. Note that SAUF algorithm forces a row major ordering of labels while BBDT does not. This function uses parallel version of both Grana and Wu's algorithms (statistics included) if at least one allowed parallel framework is enabled and if the rows of the image are at least twice the number returned by <a class="el" href="../../db/de0/group__core__utils.html#gadf09fc982bf4f17bc84bd1abce5d0863" title="Returns the number of logical CPUs available for the process. ">getNumberOfCPUs</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">image</td><td>the 8-bit single-channel image to be labeled </td></tr>
    <tr><td class="paramname">labels</td><td>destination labeled image </td></tr>
    <tr><td class="paramname">stats</td><td>statistics output for each label, including the background label. Statistics are accessed via stats(label, COLUMN) where COLUMN is one of <a class="el" href="../../d3/dc0/group__imgproc__shape.html#gac7099124c0390051c6970a987e7dc5c5" title="connected components statistics ">ConnectedComponentsTypes</a>, selecting the statistic. The data type is CV_32S. </td></tr>
    <tr><td class="paramname">centroids</td><td>centroid output for each label, including the background label. Centroids are accessed via centroids(label, 0) for x and centroids(label, 1) for y. The data type CV_64F. </td></tr>
    <tr><td class="paramname">connectivity</td><td>8 or 4 for 8-way or 4-way connectivity respectively </td></tr>
    <tr><td class="paramname">ltype</td><td>output image label type. Currently CV_32S and CV_16U are supported. </td></tr>
    <tr><td class="paramname">ccltype</td><td>connected components algorithm type (see <a class="el" href="../../d3/dc0/group__imgproc__shape.html#ga5ed7784614678adccb699c70fb841075" title="connected components algorithm ">ConnectedComponentsAlgorithmsTypes</a>). </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="gae57b028a2b2ca327227c2399a9d53241"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae57b028a2b2ca327227c2399a9d53241">◆ </a></span>connectedComponentsWithStats() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int cv::connectedComponentsWithStats </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>image</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>labels</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>stats</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>centroids</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>connectivity</em> = <code>8</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>ltype</em> = <code><a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga4067910fc388075c3ea3aa14393e83b9">CV_32S</a></code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval, labels, stats, centroids</td><td>=</td><td>cv.connectedComponentsWithStats(</td><td class="paramname">image[, labels[, stats[, centroids[, connectivity[, ltype]]]]]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>retval, labels, stats, centroids</td><td>=</td><td>cv.connectedComponentsWithStatsWithAlgorithm(</td><td class="paramname">image, connectivity, ltype, ccltype[, labels[, stats[, centroids]]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d1/d4f/imgproc_2include_2opencv2_2imgproc_8hpp.html">opencv2/imgproc.hpp</a>&gt;</code></p>
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">image</td><td>the 8-bit single-channel image to be labeled </td></tr>
    <tr><td class="paramname">labels</td><td>destination labeled image </td></tr>
    <tr><td class="paramname">stats</td><td>statistics output for each label, including the background label. Statistics are accessed via stats(label, COLUMN) where COLUMN is one of <a class="el" href="../../d3/dc0/group__imgproc__shape.html#gac7099124c0390051c6970a987e7dc5c5" title="connected components statistics ">ConnectedComponentsTypes</a>, selecting the statistic. The data type is CV_32S. </td></tr>
    <tr><td class="paramname">centroids</td><td>centroid output for each label, including the background label. Centroids are accessed via centroids(label, 0) for x and centroids(label, 1) for y. The data type CV_64F. </td></tr>
    <tr><td class="paramname">connectivity</td><td>8 or 4 for 8-way or 4-way connectivity respectively </td></tr>
    <tr><td class="paramname">ltype</td><td>output image label type. Currently CV_32S and CV_16U are supported. </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="ga2c759ed9f497d4a618048a2f56dc97f1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga2c759ed9f497d4a618048a2f56dc97f1">◆ </a></span>contourArea()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double cv::contourArea </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>contour</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool </td>
          <td class="paramname"><em>oriented</em> = <code>false</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.contourArea(</td><td class="paramname">contour[, oriented]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d1/d4f/imgproc_2include_2opencv2_2imgproc_8hpp.html">opencv2/imgproc.hpp</a>&gt;</code></p>
<p>Calculates a contour area. </p>
<p>The function computes a contour area. Similarly to moments , the area is computed using the Green formula. Thus, the returned area and the number of non-zero pixels, if you draw the contour using <a class="el" href="../../d6/d6e/group__imgproc__draw.html#ga746c0625f1781f1ffc9056259103edbc" title="Draws contours outlines or filled contours. ">drawContours</a> or <a class="el" href="../../d6/d6e/group__imgproc__draw.html#ga8c69b68fab5f25e2223b6496aa60dad5">fillPoly</a> , can be different. Also, the function will most certainly give a wrong results for contours with self-intersections.</p>
<p>Example: </p><div class="fragment"><div class="line">vector&lt;Point&gt; contour;</div><div class="line">contour.push_back(<a class="code" href="../../dc/d84/group__core__basic.html#ga7d080aa40de011e4410bca63385ffe2a">Point2f</a>(0, 0));</div><div class="line">contour.push_back(<a class="code" href="../../dc/d84/group__core__basic.html#ga7d080aa40de011e4410bca63385ffe2a">Point2f</a>(10, 0));</div><div class="line">contour.push_back(<a class="code" href="../../dc/d84/group__core__basic.html#ga7d080aa40de011e4410bca63385ffe2a">Point2f</a>(10, 10));</div><div class="line">contour.push_back(<a class="code" href="../../dc/d84/group__core__basic.html#ga7d080aa40de011e4410bca63385ffe2a">Point2f</a>(5, 4));</div><div class="line"></div><div class="line"><span class="keywordtype">double</span> area0 = <a class="code" href="../../d3/dc0/group__imgproc__shape.html#ga2c759ed9f497d4a618048a2f56dc97f1">contourArea</a>(contour);</div><div class="line">vector&lt;Point&gt; approx;</div><div class="line"><a class="code" href="../../d3/dc0/group__imgproc__shape.html#ga0012a5fdaea70b8a9970165d98722b4c">approxPolyDP</a>(contour, approx, 5, <span class="keyword">true</span>);</div><div class="line"><span class="keywordtype">double</span> area1 = <a class="code" href="../../d3/dc0/group__imgproc__shape.html#ga2c759ed9f497d4a618048a2f56dc97f1">contourArea</a>(approx);</div><div class="line"></div><div class="line">cout &lt;&lt; <span class="stringliteral">"area0 ="</span> &lt;&lt; area0 &lt;&lt; endl &lt;&lt;</div><div class="line">        <span class="stringliteral">"area1 ="</span> &lt;&lt; area1 &lt;&lt; endl &lt;&lt;</div><div class="line">        <span class="stringliteral">"approx poly vertices"</span> &lt;&lt; approx.size() &lt;&lt; endl;</div></div><!-- fragment --> <dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">contour</td><td>Input vector of 2D points (contour vertices), stored in std::vector or <a class="el" href="../../d3/d63/classcv_1_1Mat.html" title="n-dimensional dense array class ">Mat</a>. </td></tr>
    <tr><td class="paramname">oriented</td><td>Oriented area flag. If it is true, the function returns a signed area value, depending on the contour orientation (clockwise or counter-clockwise). Using this feature you can determine orientation of a contour by taking the sign of an area. By default, the parameter is false, which means that the absolute value is returned. </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../d5/de8/samples_2cpp_2segment_objects_8cpp-example.html#a10">samples/cpp/segment_objects.cpp</a>, <a class="el" href="../../db/d00/samples_2cpp_2squares_8cpp-example.html#a22">samples/cpp/squares.cpp</a>, <a class="el" href="../../da/d94/samples_2cpp_2tutorial_code_2ml_2introduction_to_pca_2introduction_to_pca_8cpp-example.html#a35">samples/cpp/tutorial_code/ml/introduction_to_pca/introduction_to_pca.cpp</a>, and <a class="el" href="../../de/dc0/samples_2tapi_2squares_8cpp-example.html#a23">samples/tapi/squares.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="ga014b28e56cb8854c0de4a211cb2be656"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga014b28e56cb8854c0de4a211cb2be656">◆ </a></span>convexHull()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::convexHull </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>points</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>hull</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool </td>
          <td class="paramname"><em>clockwise</em> = <code>false</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool </td>
          <td class="paramname"><em>returnPoints</em> = <code>true</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>hull</td><td>=</td><td>cv.convexHull(</td><td class="paramname">points[, hull[, clockwise[, returnPoints]]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d1/d4f/imgproc_2include_2opencv2_2imgproc_8hpp.html">opencv2/imgproc.hpp</a>&gt;</code></p>
<p>Finds the convex hull of a point set. </p>
<p>The function <a class="el" href="../../d3/dc0/group__imgproc__shape.html#ga014b28e56cb8854c0de4a211cb2be656" title="Finds the convex hull of a point set. ">cv::convexHull</a> finds the convex hull of a 2D point set using the Sklansky's algorithm <a class="el" href="../../d0/de3/citelist.html#CITEREF_Sklansky82">[225]</a> that has <em>O(N logN)</em> complexity in the current implementation.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">points</td><td>Input 2D point set, stored in std::vector or <a class="el" href="../../d3/d63/classcv_1_1Mat.html" title="n-dimensional dense array class ">Mat</a>. </td></tr>
    <tr><td class="paramname">hull</td><td>Output convex hull. It is either an integer vector of indices or vector of points. In the first case, the hull elements are 0-based indices of the convex hull points in the original array (since the set of convex hull points is a subset of the original point set). In the second case, hull elements are the convex hull points themselves. </td></tr>
    <tr><td class="paramname">clockwise</td><td>Orientation flag. If it is true, the output convex hull is oriented clockwise. Otherwise, it is oriented counter-clockwise. The assumed coordinate system has its X axis pointing to the right, and its Y axis pointing upwards. </td></tr>
    <tr><td class="paramname">returnPoints</td><td>Operation flag. In case of a matrix, when the flag is true, the function returns convex hull points. Otherwise, it returns indices of the convex hull points. When the output array is std::vector, the flag is ignored, and the output depends on the type of the vector: std::vector&lt;int&gt; implies returnPoints=false, std::vector&lt;Point&gt; implies returnPoints=true.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd><code>points</code> and <code>hull</code> should be different arrays, inplace processing isn't supported.</dd></dl>
<p>Check <a class="el" href="../../d7/d1d/tutorial_hull.html">the corresponding tutorial</a> for more details.</p>
<p>useful links:</p>
<p><a href="https://www.learnopencv.com/convex-hull-using-opencv-in-python-and-c/">https://www.learnopencv.com/convex-hull-using-opencv-in-python-and-c/</a> </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../d5/d04/samples_2cpp_2convexhull_8cpp-example.html#a12">samples/cpp/convexhull.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="gada4437098113fd8683c932e0567f47ba"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gada4437098113fd8683c932e0567f47ba">◆ </a></span>convexityDefects()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::convexityDefects </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>contour</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>convexhull</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>convexityDefects</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>convexityDefects</td><td>=</td><td>cv.convexityDefects(</td><td class="paramname">contour, convexhull[, convexityDefects]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d1/d4f/imgproc_2include_2opencv2_2imgproc_8hpp.html">opencv2/imgproc.hpp</a>&gt;</code></p>
<p>Finds the convexity defects of a contour. </p>
<p>The figure below displays convexity defects of a hand contour:</p>
<div class="image">
<img alt="defects.png" src="../../defects.png"/>
<div class="caption">
image</div></div>
 <dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">contour</td><td>Input contour. </td></tr>
    <tr><td class="paramname">convexhull</td><td>Convex hull obtained using convexHull that should contain indices of the contour points that make the hull. </td></tr>
    <tr><td class="paramname">convexityDefects</td><td>The output vector of convexity defects. In C++ and the new Python/Java interface each convexity defect is represented as 4-element integer vector (a.k.a. <a class="el" href="../../dc/d84/group__core__basic.html#ga94ce799099ae6cdd66685e3fd0cad7d7">Vec4i</a>): (start_index, end_index, farthest_pt_index, fixpt_depth), where indices are 0-based indices in the original contour of the convexity defect beginning, end and the farthest point, and fixpt_depth is fixed-point approximation (with 8 fractional bits) of the distance between the farthest contour point and the hull. That is, to get the floating-point value of the depth will be fixpt_depth/256.0. </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="ga3252811b8a7a5f606dc0a88927982ee9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3252811b8a7a5f606dc0a88927982ee9">◆ </a></span>createGeneralizedHoughBallard()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt;<a class="el" href="../../dc/d46/classcv_1_1GeneralizedHoughBallard.html">GeneralizedHoughBallard</a>&gt; cv::createGeneralizedHoughBallard </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.createGeneralizedHoughBallard(</td><td class="paramname"></td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d1/d4f/imgproc_2include_2opencv2_2imgproc_8hpp.html">opencv2/imgproc.hpp</a>&gt;</code></p>
<p>Creates a smart pointer to a <a class="el" href="../../dc/d46/classcv_1_1GeneralizedHoughBallard.html" title="finds arbitrary template in the grayscale image using Generalized Hough Transform ...">cv::GeneralizedHoughBallard</a> class and initializes it. </p>
</div>
</div>
<a id="gae2eb1e12452257b63d09ba9ce871f58c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae2eb1e12452257b63d09ba9ce871f58c">◆ </a></span>createGeneralizedHoughGuil()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt;<a class="el" href="../../d3/d20/classcv_1_1GeneralizedHoughGuil.html">GeneralizedHoughGuil</a>&gt; cv::createGeneralizedHoughGuil </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.createGeneralizedHoughGuil(</td><td class="paramname"></td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d1/d4f/imgproc_2include_2opencv2_2imgproc_8hpp.html">opencv2/imgproc.hpp</a>&gt;</code></p>
<p>Creates a smart pointer to a <a class="el" href="../../d3/d20/classcv_1_1GeneralizedHoughGuil.html" title="finds arbitrary template in the grayscale image using Generalized Hough Transform ...">cv::GeneralizedHoughGuil</a> class and initializes it. </p>
</div>
</div>
<a id="gadf1ad6a0b82947fa1fe3c3d497f260e0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gadf1ad6a0b82947fa1fe3c3d497f260e0">◆ </a></span>findContours() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::findContours </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>image</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga889a09549b98223016170d9b613715de">OutputArrayOfArrays</a> </td>
          <td class="paramname"><em>contours</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>hierarchy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>mode</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>method</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga1e83eafb2d26b3c93f09e8338bcab192">Point</a> </td>
          <td class="paramname"><em>offset</em> = <code><a class="el" href="../../dc/d84/group__core__basic.html#ga1e83eafb2d26b3c93f09e8338bcab192">Point</a>()</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>contours, hierarchy</td><td>=</td><td>cv.findContours(</td><td class="paramname">image, mode, method[, contours[, hierarchy[, offset]]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d1/d4f/imgproc_2include_2opencv2_2imgproc_8hpp.html">opencv2/imgproc.hpp</a>&gt;</code></p>
<p>Finds contours in a binary image. </p>
<p>The function retrieves contours from the binary image using the algorithm <a class="el" href="../../d0/de3/citelist.html#CITEREF_Suzuki85">[234]</a> . The contours are a useful tool for shape analysis and object detection and recognition. See squares.cpp in the OpenCV sample directory. </p><dl class="section note"><dt>Note</dt><dd>Since opencv 3.2 source image is not modified by this function.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">image</td><td>Source, an 8-bit single-channel image. Non-zero pixels are treated as 1's. Zero pixels remain 0's, so the image is treated as binary . You can use <a class="el" href="../../d2/de8/group__core__array.html#ga303cfb72acf8cbb36d884650c09a3a97" title="Performs the per-element comparison of two arrays or an array and scalar value. ">compare</a>, <a class="el" href="../../d2/de8/group__core__array.html#ga48af0ab51e36436c5d04340e036ce981" title="Checks if array elements lie between the elements of two other arrays. ">inRange</a>, <a class="el" href="../../d7/d1b/group__imgproc__misc.html#gae8a4a146d1ca78c626a53577199e9c57" title="Applies a fixed-level threshold to each array element. ">threshold</a> , <a class="el" href="../../d7/d1b/group__imgproc__misc.html#ga72b913f352e4a1b1b397736707afcde3" title="Applies an adaptive threshold to an array. ">adaptiveThreshold</a>, <a class="el" href="../../dd/d1a/group__imgproc__feature.html#ga04723e007ed888ddf11d9ba04e2232de" title="Finds edges in an image using the Canny algorithm  . ">Canny</a>, and others to create a binary image out of a grayscale or color one. If mode equals to <a class="el" href="../../d3/dc0/group__imgproc__shape.html#gga819779b9857cc2f8601e6526a3a5bc71a7d1d4b509fb2a9a8dc2f960357748752">RETR_CCOMP</a> or <a class="el" href="../../d3/dc0/group__imgproc__shape.html#gga819779b9857cc2f8601e6526a3a5bc71acc80715d6a2a51855cb3a9a8093a9352">RETR_FLOODFILL</a>, the input can also be a 32-bit integer image of labels (CV_32SC1). </td></tr>
    <tr><td class="paramname">contours</td><td>Detected contours. Each contour is stored as a vector of points (e.g. std::vector&lt;std::vector&lt;cv::Point&gt; &gt;). </td></tr>
    <tr><td class="paramname">hierarchy</td><td>Optional output vector (e.g. std::vector&lt;cv::Vec4i&gt;), containing information about the image topology. It has as many elements as the number of contours. For each i-th contour contours[i], the elements hierarchy[i][0] , hierarchy[i][1] , hierarchy[i][2] , and hierarchy[i][3] are set to 0-based indices in contours of the next and previous contours at the same hierarchical level, the first child contour and the parent contour, respectively. If for the contour i there are no next, previous, parent, or nested contours, the corresponding elements of hierarchy[i] will be negative. </td></tr>
    <tr><td class="paramname">mode</td><td>Contour retrieval mode, see <a class="el" href="../../d3/dc0/group__imgproc__shape.html#ga819779b9857cc2f8601e6526a3a5bc71" title="mode of the contour retrieval algorithm ">RetrievalModes</a> </td></tr>
    <tr><td class="paramname">method</td><td>Contour approximation method, see <a class="el" href="../../d3/dc0/group__imgproc__shape.html#ga4303f45752694956374734a03c54d5ff" title="the contour approximation algorithm ">ContourApproximationModes</a> </td></tr>
    <tr><td class="paramname">offset</td><td>Optional offset by which every contour point is shifted. This is useful if the contours are extracted from the image ROI and then they should be analyzed in the whole image context. </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../d0/d38/modules_2shape_2samples_2shape_example_8cpp-example.html#a1">modules/shape/samples/shape_example.cpp</a>, <a class="el" href="../../da/d32/samples_2cpp_2contours2_8cpp-example.html#a21">samples/cpp/contours2.cpp</a>, <a class="el" href="../../d9/d73/samples_2cpp_2fitellipse_8cpp-example.html#a46">samples/cpp/fitellipse.cpp</a>, <a class="el" href="../../d5/de8/samples_2cpp_2segment_objects_8cpp-example.html#a5">samples/cpp/segment_objects.cpp</a>, <a class="el" href="../../db/d00/samples_2cpp_2squares_8cpp-example.html#a17">samples/cpp/squares.cpp</a>, <a class="el" href="../../da/d94/samples_2cpp_2tutorial_code_2ml_2introduction_to_pca_2introduction_to_pca_8cpp-example.html#a32">samples/cpp/tutorial_code/ml/introduction_to_pca/introduction_to_pca.cpp</a>, <a class="el" href="../../d4/d40/samples_2cpp_2watershed_8cpp-example.html#a26">samples/cpp/watershed.cpp</a>, and <a class="el" href="../../de/dc0/samples_2tapi_2squares_8cpp-example.html#a18">samples/tapi/squares.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="gae4156f04053c44f886e387cff0ef6e08"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae4156f04053c44f886e387cff0ef6e08">◆ </a></span>findContours() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::findContours </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>image</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga889a09549b98223016170d9b613715de">OutputArrayOfArrays</a> </td>
          <td class="paramname"><em>contours</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>mode</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>method</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga1e83eafb2d26b3c93f09e8338bcab192">Point</a> </td>
          <td class="paramname"><em>offset</em> = <code><a class="el" href="../../dc/d84/group__core__basic.html#ga1e83eafb2d26b3c93f09e8338bcab192">Point</a>()</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>contours, hierarchy</td><td>=</td><td>cv.findContours(</td><td class="paramname">image, mode, method[, contours[, hierarchy[, offset]]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d1/d4f/imgproc_2include_2opencv2_2imgproc_8hpp.html">opencv2/imgproc.hpp</a>&gt;</code></p>
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
</div>
</div>
<a id="gaf259efaad93098103d6c27b9e4900ffa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf259efaad93098103d6c27b9e4900ffa">◆ </a></span>fitEllipse()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../db/dd6/classcv_1_1RotatedRect.html">RotatedRect</a> cv::fitEllipse </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>points</em></td><td>)</td>
          <td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.fitEllipse(</td><td class="paramname">points</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d1/d4f/imgproc_2include_2opencv2_2imgproc_8hpp.html">opencv2/imgproc.hpp</a>&gt;</code></p>
<p>Fits an ellipse around a set of 2D points. </p>
<p>The function calculates the ellipse that fits (in a least-squares sense) a set of 2D points best of all. It returns the rotated rectangle in which the ellipse is inscribed. The first algorithm described by <a class="el" href="../../d0/de3/citelist.html#CITEREF_Fitzgibbon95">[78]</a> is used. Developer should keep in mind that it is possible that the returned ellipse/rotatedRect data contains negative indices, due to the data points being close to the border of the containing <a class="el" href="../../d3/d63/classcv_1_1Mat.html" title="n-dimensional dense array class ">Mat</a> element.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">points</td><td>Input 2D point set, stored in std::vector&lt;&gt; or <a class="el" href="../../d3/d63/classcv_1_1Mat.html" title="n-dimensional dense array class ">Mat</a> </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../d9/d73/samples_2cpp_2fitellipse_8cpp-example.html#a54">samples/cpp/fitellipse.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="ga69e90cda55c4e192a8caa0b99c3e4550"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga69e90cda55c4e192a8caa0b99c3e4550">◆ </a></span>fitEllipseAMS()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../db/dd6/classcv_1_1RotatedRect.html">RotatedRect</a> cv::fitEllipseAMS </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>points</em></td><td>)</td>
          <td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.fitEllipseAMS(</td><td class="paramname">points</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d1/d4f/imgproc_2include_2opencv2_2imgproc_8hpp.html">opencv2/imgproc.hpp</a>&gt;</code></p>
<p>Fits an ellipse around a set of 2D points. </p>
<p>The function calculates the ellipse that fits a set of 2D points. It returns the rotated rectangle in which the ellipse is inscribed. The Approximate Mean Square (AMS) proposed by <a class="el" href="../../d0/de3/citelist.html#CITEREF_Taubin1991">[241]</a> is used.</p>
<p>For an ellipse, this basis set is \( \chi= \left(x^2, x y, y^2, x, y, 1\right) \), which is a set of six free coefficients \( A^T=\left\{A_{\text{xx}},A_{\text{xy}},A_{\text{yy}},A_x,A_y,A_0\right\} \). However, to specify an ellipse, all that is needed is five numbers; the major and minor axes lengths \( (a,b) \), the position \( (x_0,y_0) \), and the orientation \( \theta \). This is because the basis set includes lines, quadratics, parabolic and hyperbolic functions as well as elliptical functions as possible fits. If the fit is found to be a parabolic or hyperbolic function then the standard <a class="el" href="../../d3/dc0/group__imgproc__shape.html#gaf259efaad93098103d6c27b9e4900ffa" title="Fits an ellipse around a set of 2D points. ">fitEllipse</a> method is used. The AMS method restricts the fit to parabolic, hyperbolic and elliptical curves by imposing the condition that \( A^T ( D_x^T D_x + D_y^T D_y) A = 1 \) where the matrices \( Dx \) and \( Dy \) are the partial derivatives of the design matrix \( D \) with respect to x and y. The matrices are formed row by row applying the following to each of the points in the set: </p><p class="formulaDsp">
\begin{align*} D(i,:)&amp;=\left\{x_i^2, x_i y_i, y_i^2, x_i, y_i, 1\right\} &amp; D_x(i,:)&amp;=\left\{2 x_i,y_i,0,1,0,0\right\} &amp; D_y(i,:)&amp;=\left\{0,x_i,2 y_i,0,1,0\right\} \end{align*}
</p>
<p> The AMS method minimizes the cost function </p><p class="formulaDsp">
\begin{equation*} \epsilon ^2=\frac{ A^T D^T D A }{ A^T (D_x^T D_x + D_y^T D_y) A^T } \end{equation*}
</p>
<p>The minimum cost is found by solving the generalized eigenvalue problem.</p>
<p class="formulaDsp">
\begin{equation*} D^T D A = \lambda \left( D_x^T D_x + D_y^T D_y\right) A \end{equation*}
</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">points</td><td>Input 2D point set, stored in std::vector&lt;&gt; or <a class="el" href="../../d3/d63/classcv_1_1Mat.html" title="n-dimensional dense array class ">Mat</a> </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../d9/d73/samples_2cpp_2fitellipse_8cpp-example.html#a55">samples/cpp/fitellipse.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="ga6421884fd411923a74891998bbe9e813"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6421884fd411923a74891998bbe9e813">◆ </a></span>fitEllipseDirect()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../db/dd6/classcv_1_1RotatedRect.html">RotatedRect</a> cv::fitEllipseDirect </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>points</em></td><td>)</td>
          <td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.fitEllipseDirect(</td><td class="paramname">points</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d1/d4f/imgproc_2include_2opencv2_2imgproc_8hpp.html">opencv2/imgproc.hpp</a>&gt;</code></p>
<p>Fits an ellipse around a set of 2D points. </p>
<p>The function calculates the ellipse that fits a set of 2D points. It returns the rotated rectangle in which the ellipse is inscribed. The Direct least square (Direct) method by <a class="el" href="../../d0/de3/citelist.html#CITEREF_Fitzgibbon1999">[79]</a> is used.</p>
<p>For an ellipse, this basis set is \( \chi= \left(x^2, x y, y^2, x, y, 1\right) \), which is a set of six free coefficients \( A^T=\left\{A_{\text{xx}},A_{\text{xy}},A_{\text{yy}},A_x,A_y,A_0\right\} \). However, to specify an ellipse, all that is needed is five numbers; the major and minor axes lengths \( (a,b) \), the position \( (x_0,y_0) \), and the orientation \( \theta \). This is because the basis set includes lines, quadratics, parabolic and hyperbolic functions as well as elliptical functions as possible fits. The Direct method confines the fit to ellipses by ensuring that \( 4 A_{xx} A_{yy}- A_{xy}^2 &gt; 0 \). The condition imposed is that \( 4 A_{xx} A_{yy}- A_{xy}^2=1 \) which satisfies the inequality and as the coefficients can be arbitrarily scaled is not overly restrictive.</p>
<p class="formulaDsp">
\begin{equation*} \epsilon ^2= A^T D^T D A \quad \text{with} \quad A^T C A =1 \quad \text{and} \quad C=\left(\begin{matrix} 0 &amp; 0 &amp; 2 &amp; 0 &amp; 0 &amp; 0 \\ 0 &amp; -1 &amp; 0 &amp; 0 &amp; 0 &amp; 0 \\ 2 &amp; 0 &amp; 0 &amp; 0 &amp; 0 &amp; 0 \\ 0 &amp; 0 &amp; 0 &amp; 0 &amp; 0 &amp; 0 \\ 0 &amp; 0 &amp; 0 &amp; 0 &amp; 0 &amp; 0 \\ 0 &amp; 0 &amp; 0 &amp; 0 &amp; 0 &amp; 0 \end{matrix} \right) \end{equation*}
</p>
<p>The minimum cost is found by solving the generalized eigenvalue problem.</p>
<p class="formulaDsp">
\begin{equation*} D^T D A = \lambda \left( C\right) A \end{equation*}
</p>
<p>The system produces only one positive eigenvalue \( \lambda\) which is chosen as the solution with its eigenvector \(\mathbf{u}\). These are used to find the coefficients</p>
<p class="formulaDsp">
\begin{equation*} A = \sqrt{\frac{1}{\mathbf{u}^T C \mathbf{u}}} \mathbf{u} \end{equation*}
</p>
<p> The scaling factor guarantees that \(A^T C A =1\).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">points</td><td>Input 2D point set, stored in std::vector&lt;&gt; or <a class="el" href="../../d3/d63/classcv_1_1Mat.html" title="n-dimensional dense array class ">Mat</a> </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../d9/d73/samples_2cpp_2fitellipse_8cpp-example.html#a56">samples/cpp/fitellipse.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="gaf849da1fdafa67ee84b1e9a23b93f91f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf849da1fdafa67ee84b1e9a23b93f91f">◆ </a></span>fitLine()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::fitLine </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>points</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>line</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>distType</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double </td>
          <td class="paramname"><em>param</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double </td>
          <td class="paramname"><em>reps</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double </td>
          <td class="paramname"><em>aeps</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>line</td><td>=</td><td>cv.fitLine(</td><td class="paramname">points, distType, param, reps, aeps[, line]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d1/d4f/imgproc_2include_2opencv2_2imgproc_8hpp.html">opencv2/imgproc.hpp</a>&gt;</code></p>
<p>Fits a line to a 2D or 3D point set. </p>
<p>The function fitLine fits a line to a 2D or 3D point set by minimizing \(\sum_i \rho(r_i)\) where \(r_i\) is a distance between the \(i^{th}\) point, the line and \(\rho(r)\) is a distance function, one of the following:</p><ul>
<li>DIST_L2 <p class="formulaDsp">
\[\rho (r) = r^2/2 \quad \text{(the simplest and the fastest least-squares method)}\]
</p>
</li>
<li>DIST_L1 <p class="formulaDsp">
\[\rho (r) = r\]
</p>
</li>
<li>DIST_L12 <p class="formulaDsp">
\[\rho (r) = 2 \cdot ( \sqrt{1 + \frac{r^2}{2}} - 1)\]
</p>
</li>
<li>DIST_FAIR <p class="formulaDsp">
\[\rho \left (r \right ) = C^2 \cdot \left ( \frac{r}{C} - \log{\left(1 + \frac{r}{C}\right)} \right ) \quad \text{where} \quad C=1.3998\]
</p>
</li>
<li>DIST_WELSCH <p class="formulaDsp">
\[\rho \left (r \right ) = \frac{C^2}{2} \cdot \left ( 1 - \exp{\left(-\left(\frac{r}{C}\right)^2\right)} \right ) \quad \text{where} \quad C=2.9846\]
</p>
</li>
<li>DIST_HUBER <p class="formulaDsp">
\[\rho (r) = \fork{r^2/2}{if \(r &lt; C\)}{C \cdot (r-C/2)}{otherwise} \quad \text{where} \quad C=1.345\]
</p>
</li>
</ul>
<p>The algorithm is based on the M-estimator ( <a href="http://en.wikipedia.org/wiki/M-estimator">http://en.wikipedia.org/wiki/M-estimator</a> ) technique that iteratively fits the line using the weighted least-squares algorithm. After each iteration the weights \(w_i\) are adjusted to be inversely proportional to \(\rho(r_i)\) .</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">points</td><td>Input vector of 2D or 3D points, stored in std::vector&lt;&gt; or <a class="el" href="../../d3/d63/classcv_1_1Mat.html" title="n-dimensional dense array class ">Mat</a>. </td></tr>
    <tr><td class="paramname">line</td><td>Output line parameters. In case of 2D fitting, it should be a vector of 4 elements (like Vec4f) - (vx, vy, x0, y0), where (vx, vy) is a normalized vector collinear to the line and (x0, y0) is a point on the line. In case of 3D fitting, it should be a vector of 6 elements (like Vec6f) - (vx, vy, vz, x0, y0, z0), where (vx, vy, vz) is a normalized vector collinear to the line and (x0, y0, z0) is a point on the line. </td></tr>
    <tr><td class="paramname">distType</td><td>Distance used by the M-estimator, see <a class="el" href="../../d7/d1b/group__imgproc__misc.html#gaa2bfbebbc5c320526897996aafa1d8eb">DistanceTypes</a> </td></tr>
    <tr><td class="paramname">param</td><td>Numerical parameter ( C ) for some types of distances. If it is 0, an optimal value is chosen. </td></tr>
    <tr><td class="paramname">reps</td><td>Sufficient accuracy for the radius (distance between the coordinate origin and the line). </td></tr>
    <tr><td class="paramname">aeps</td><td>Sufficient accuracy for the angle. 0.01 would be a good default value for reps and aeps. </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="gab001db45c1f1af6cbdbe64df04c4e944"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab001db45c1f1af6cbdbe64df04c4e944">◆ </a></span>HuMoments() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::HuMoments </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d8/d23/classcv_1_1Moments.html">Moments</a> &amp; </td>
          <td class="paramname"><em>moments</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double </td>
          <td class="paramname"><em>hu</em>[7] </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>hu</td><td>=</td><td>cv.HuMoments(</td><td class="paramname">m[, hu]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d1/d4f/imgproc_2include_2opencv2_2imgproc_8hpp.html">opencv2/imgproc.hpp</a>&gt;</code></p>
<p>Calculates seven Hu invariants. </p>
<p>The function calculates seven Hu invariants (introduced in <a class="el" href="../../d0/de3/citelist.html#CITEREF_Hu62">[117]</a>; see also <a href="http://en.wikipedia.org/wiki/Image_moment">http://en.wikipedia.org/wiki/Image_moment</a>) defined as:</p>
<p class="formulaDsp">
\[\begin{array}{l} hu[0]= \eta _{20}+ \eta _{02} \\ hu[1]=( \eta _{20}- \eta _{02})^{2}+4 \eta _{11}^{2} \\ hu[2]=( \eta _{30}-3 \eta _{12})^{2}+ (3 \eta _{21}- \eta _{03})^{2} \\ hu[3]=( \eta _{30}+ \eta _{12})^{2}+ ( \eta _{21}+ \eta _{03})^{2} \\ hu[4]=( \eta _{30}-3 \eta _{12})( \eta _{30}+ \eta _{12})[( \eta _{30}+ \eta _{12})^{2}-3( \eta _{21}+ \eta _{03})^{2}]+(3 \eta _{21}- \eta _{03})( \eta _{21}+ \eta _{03})[3( \eta _{30}+ \eta _{12})^{2}-( \eta _{21}+ \eta _{03})^{2}] \\ hu[5]=( \eta _{20}- \eta _{02})[( \eta _{30}+ \eta _{12})^{2}- ( \eta _{21}+ \eta _{03})^{2}]+4 \eta _{11}( \eta _{30}+ \eta _{12})( \eta _{21}+ \eta _{03}) \\ hu[6]=(3 \eta _{21}- \eta _{03})( \eta _{21}+ \eta _{03})[3( \eta _{30}+ \eta _{12})^{2}-( \eta _{21}+ \eta _{03})^{2}]-( \eta _{30}-3 \eta _{12})( \eta _{21}+ \eta _{03})[3( \eta _{30}+ \eta _{12})^{2}-( \eta _{21}+ \eta _{03})^{2}] \\ \end{array}\]
</p>
<p>where \(\eta_{ji}\) stands for \(\texttt{Moments::nu}_{ji}\) .</p>
<p>These values are proved to be invariants to the image scale, rotation, and reflection except the seventh one, whose sign is changed by reflection. This invariance is proved with the assumption of infinite image resolution. In case of raster images, the computed Hu invariants for the original and transformed images are a bit different.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">moments</td><td>Input moments computed with moments . </td></tr>
    <tr><td class="paramname">hu</td><td>Output Hu invariants.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d3/dc0/group__imgproc__shape.html#gaadc90cb16e2362c9bd6e7363e6e4c317" title="Compares two shapes. ">matchShapes</a> </dd></dl>
</div>
</div>
<a id="ga6d6ac1b519cba25190119afe3a52c1cc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6d6ac1b519cba25190119afe3a52c1cc">◆ </a></span>HuMoments() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::HuMoments </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d8/d23/classcv_1_1Moments.html">Moments</a> &amp; </td>
          <td class="paramname"><em>m</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>hu</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>hu</td><td>=</td><td>cv.HuMoments(</td><td class="paramname">m[, hu]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d1/d4f/imgproc_2include_2opencv2_2imgproc_8hpp.html">opencv2/imgproc.hpp</a>&gt;</code></p>
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
</div>
</div>
<a id="ga8e840f3f3695613d32c052bec89e782c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8e840f3f3695613d32c052bec89e782c">◆ </a></span>intersectConvexConvex()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float cv::intersectConvexConvex </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>_p1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>_p2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>_p12</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool </td>
          <td class="paramname"><em>handleNested</em> = <code>true</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval, _p12</td><td>=</td><td>cv.intersectConvexConvex(</td><td class="paramname">_p1, _p2[, _p12[, handleNested]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d1/d4f/imgproc_2include_2opencv2_2imgproc_8hpp.html">opencv2/imgproc.hpp</a>&gt;</code></p>
<p>Finds intersection of two convex polygons. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">_p1</td><td>First polygon </td></tr>
    <tr><td class="paramname">_p2</td><td>Second polygon </td></tr>
    <tr><td class="paramname">_p12</td><td>Output polygon describing the intersecting area </td></tr>
    <tr><td class="paramname">handleNested</td><td>When true, an intersection is found if one of the polygons is fully enclosed in the other. When false, no intersection is found. If the polygons share a side or the vertex of one polygon lies on an edge of the other, they are not considered nested and an intersection will be found regardless of the value of handleNested.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Absolute value of area of intersecting polygon</dd></dl>
<dl class="section note"><dt>Note</dt><dd>intersectConvexConvex doesn't confirm that both polygons are convex and will return invalid results if they aren't. </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../df/da5/samples_2cpp_2intersectExample_8cpp-example.html#a7">samples/cpp/intersectExample.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="ga8abf8010377b58cbc16db6734d92941b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8abf8010377b58cbc16db6734d92941b">◆ </a></span>isContourConvex()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool cv::isContourConvex </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>contour</em></td><td>)</td>
          <td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.isContourConvex(</td><td class="paramname">contour</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d1/d4f/imgproc_2include_2opencv2_2imgproc_8hpp.html">opencv2/imgproc.hpp</a>&gt;</code></p>
<p>Tests a contour convexity. </p>
<p>The function tests whether the input contour is convex or not. The contour must be simple, that is, without self-intersections. Otherwise, the function output is undefined.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">contour</td><td>Input vector of 2D points, stored in std::vector&lt;&gt; or <a class="el" href="../../d3/d63/classcv_1_1Mat.html" title="n-dimensional dense array class ">Mat</a> </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../df/da5/samples_2cpp_2intersectExample_8cpp-example.html#a9">samples/cpp/intersectExample.cpp</a>, <a class="el" href="../../db/d00/samples_2cpp_2squares_8cpp-example.html#a23">samples/cpp/squares.cpp</a>, and <a class="el" href="../../de/dc0/samples_2tapi_2squares_8cpp-example.html#a24">samples/tapi/squares.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="gaadc90cb16e2362c9bd6e7363e6e4c317"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaadc90cb16e2362c9bd6e7363e6e4c317">◆ </a></span>matchShapes()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double cv::matchShapes </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>contour1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>contour2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>method</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double </td>
          <td class="paramname"><em>parameter</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.matchShapes(</td><td class="paramname">contour1, contour2, method, parameter</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d1/d4f/imgproc_2include_2opencv2_2imgproc_8hpp.html">opencv2/imgproc.hpp</a>&gt;</code></p>
<p>Compares two shapes. </p>
<p>The function compares two shapes. All three implemented methods use the Hu invariants (see <a class="el" href="../../d3/dc0/group__imgproc__shape.html#gab001db45c1f1af6cbdbe64df04c4e944" title="Calculates seven Hu invariants. ">HuMoments</a>)</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">contour1</td><td>First contour or grayscale image. </td></tr>
    <tr><td class="paramname">contour2</td><td>Second contour or grayscale image. </td></tr>
    <tr><td class="paramname">method</td><td>Comparison method, see <a class="el" href="../../d3/dc0/group__imgproc__shape.html#gaf2b97a230b51856d09a2d934b78c015f" title="Shape matching methods. ">ShapeMatchModes</a> </td></tr>
    <tr><td class="paramname">parameter</td><td>Method-specific parameter (not supported now). </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="ga3d476a3417130ae5154aea421ca7ead9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3d476a3417130ae5154aea421ca7ead9">◆ </a></span>minAreaRect()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../db/dd6/classcv_1_1RotatedRect.html">RotatedRect</a> cv::minAreaRect </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>points</em></td><td>)</td>
          <td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.minAreaRect(</td><td class="paramname">points</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d1/d4f/imgproc_2include_2opencv2_2imgproc_8hpp.html">opencv2/imgproc.hpp</a>&gt;</code></p>
<p>Finds a rotated rectangle of the minimum area enclosing the input 2D point set. </p>
<p>The function calculates and returns the minimum-area bounding rectangle (possibly rotated) for a specified point set. Developer should keep in mind that the returned <a class="el" href="../../db/dd6/classcv_1_1RotatedRect.html" title="The class represents rotated (i.e. not up-right) rectangles on a plane. ">RotatedRect</a> can contain negative indices when data is close to the containing <a class="el" href="../../d3/d63/classcv_1_1Mat.html" title="n-dimensional dense array class ">Mat</a> element boundary.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">points</td><td>Input vector of 2D points, stored in std::vector&lt;&gt; or <a class="el" href="../../d3/d63/classcv_1_1Mat.html" title="n-dimensional dense array class ">Mat</a> </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../df/dee/samples_2cpp_2minarea_8cpp-example.html#a13">samples/cpp/minarea.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="ga8ce13c24081bbc7151e9326f412190f1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8ce13c24081bbc7151e9326f412190f1">◆ </a></span>minEnclosingCircle()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::minEnclosingCircle </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>points</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga7d080aa40de011e4410bca63385ffe2a">Point2f</a> &amp; </td>
          <td class="paramname"><em>center</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float &amp; </td>
          <td class="paramname"><em>radius</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>center, radius</td><td>=</td><td>cv.minEnclosingCircle(</td><td class="paramname">points</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d1/d4f/imgproc_2include_2opencv2_2imgproc_8hpp.html">opencv2/imgproc.hpp</a>&gt;</code></p>
<p>Finds a circle of the minimum area enclosing a 2D point set. </p>
<p>The function finds the minimal enclosing circle of a 2D point set using an iterative algorithm.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">points</td><td>Input vector of 2D points, stored in std::vector&lt;&gt; or <a class="el" href="../../d3/d63/classcv_1_1Mat.html" title="n-dimensional dense array class ">Mat</a> </td></tr>
    <tr><td class="paramname">center</td><td>Output center of the circle. </td></tr>
    <tr><td class="paramname">radius</td><td>Output radius of the circle. </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../df/dee/samples_2cpp_2minarea_8cpp-example.html#a17">samples/cpp/minarea.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="ga1513e72f6bbdfc370563664f71e0542f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1513e72f6bbdfc370563664f71e0542f">◆ </a></span>minEnclosingTriangle()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double cv::minEnclosingTriangle </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>points</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>triangle</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval, triangle</td><td>=</td><td>cv.minEnclosingTriangle(</td><td class="paramname">points[, triangle]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d1/d4f/imgproc_2include_2opencv2_2imgproc_8hpp.html">opencv2/imgproc.hpp</a>&gt;</code></p>
<p>Finds a triangle of minimum area enclosing a 2D point set and returns its area. </p>
<p>The function finds a triangle of minimum area enclosing the given set of 2D points and returns its area. The output for a given 2D point set is shown in the image below. 2D points are depicted in red* and the enclosing triangle in <em>yellow</em>.</p>
<div class="image">
<img alt="minenclosingtriangle.png" src="../../minenclosingtriangle.png"/>
<div class="caption">
Sample output of the minimum enclosing triangle function</div></div>
<p> The implementation of the algorithm is based on O'Rourke's <a class="el" href="../../d0/de3/citelist.html#CITEREF_ORourke86">[189]</a> and Klee and Laskowski's <a class="el" href="../../d0/de3/citelist.html#CITEREF_KleeLaskowski85">[130]</a> papers. O'Rourke provides a \(\theta(n)\) algorithm for finding the minimal enclosing triangle of a 2D convex polygon with n vertices. Since the <a class="el" href="../../d3/dc0/group__imgproc__shape.html#ga1513e72f6bbdfc370563664f71e0542f" title="Finds a triangle of minimum area enclosing a 2D point set and returns its area. ">minEnclosingTriangle</a> function takes a 2D point set as input an additional preprocessing step of computing the convex hull of the 2D point set is required. The complexity of the <a class="el" href="../../d3/dc0/group__imgproc__shape.html#ga014b28e56cb8854c0de4a211cb2be656" title="Finds the convex hull of a point set. ">convexHull</a> function is \(O(n log(n))\) which is higher than \(\theta(n)\). Thus the overall complexity of the function is \(O(n log(n))\).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">points</td><td>Input vector of 2D points with depth CV_32S or CV_32F, stored in std::vector&lt;&gt; or <a class="el" href="../../d3/d63/classcv_1_1Mat.html" title="n-dimensional dense array class ">Mat</a> </td></tr>
    <tr><td class="paramname">triangle</td><td>Output vector of three 2D points defining the vertices of the triangle. The depth of the OutputArray must be CV_32F. </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../df/dee/samples_2cpp_2minarea_8cpp-example.html#a16">samples/cpp/minarea.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="ga556a180f43cab22649c23ada36a8a139"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga556a180f43cab22649c23ada36a8a139">◆ </a></span>moments()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d8/d23/classcv_1_1Moments.html">Moments</a> cv::moments </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>array</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool </td>
          <td class="paramname"><em>binaryImage</em> = <code>false</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.moments(</td><td class="paramname">array[, binaryImage]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d1/d4f/imgproc_2include_2opencv2_2imgproc_8hpp.html">opencv2/imgproc.hpp</a>&gt;</code></p>
<p>Calculates all of the moments up to the third order of a polygon or rasterized shape. </p>
<p>The function computes moments, up to the 3rd order, of a vector shape or a rasterized shape. The results are returned in the structure <a class="el" href="../../d8/d23/classcv_1_1Moments.html" title="struct returned by cv::moments ">cv::Moments</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">array</td><td>Raster image (single-channel, 8-bit or floating-point 2D array) or an array ( \(1 \times N\) or \(N \times 1\) ) of 2D points (Point or Point2f ). </td></tr>
    <tr><td class="paramname">binaryImage</td><td>If it is true, all non-zero image pixels are treated as 1's. The parameter is used for images only. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>moments.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>Only applicable to contour moments calculations from Python bindings: Note that the numpy type for the input array should be either np.int32 or np.float32.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d3/dc0/group__imgproc__shape.html#ga2c759ed9f497d4a618048a2f56dc97f1" title="Calculates a contour area. ">contourArea</a>, <a class="el" href="../../d3/dc0/group__imgproc__shape.html#ga8d26483c636be6b35c3ec6335798a47c" title="Calculates a contour perimeter or a curve length. ">arcLength</a> </dd></dl>
</div>
</div>
<a id="ga1a539e8db2135af2566103705d7a5722"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1a539e8db2135af2566103705d7a5722">◆ </a></span>pointPolygonTest()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double cv::pointPolygonTest </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>contour</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga7d080aa40de011e4410bca63385ffe2a">Point2f</a> </td>
          <td class="paramname"><em>pt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool </td>
          <td class="paramname"><em>measureDist</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.pointPolygonTest(</td><td class="paramname">contour, pt, measureDist</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d1/d4f/imgproc_2include_2opencv2_2imgproc_8hpp.html">opencv2/imgproc.hpp</a>&gt;</code></p>
<p>Performs a point-in-contour test. </p>
<p>The function determines whether the point is inside a contour, outside, or lies on an edge (or coincides with a vertex). It returns positive (inside), negative (outside), or zero (on an edge) value, correspondingly. When measureDist=false , the return value is +1, -1, and 0, respectively. Otherwise, the return value is a signed distance between the point and the nearest contour edge.</p>
<p>See below a sample output of the function where each image pixel is tested against the contour:</p>
<div class="image">
<img alt="pointpolygon.png" src="../../pointpolygon.png"/>
<div class="caption">
sample output</div></div>
 <dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">contour</td><td>Input contour. </td></tr>
    <tr><td class="paramname">pt</td><td>Point tested against the contour. </td></tr>
    <tr><td class="paramname">measureDist</td><td>If true, the function estimates the signed distance from the point to the nearest contour edge. Otherwise, the function only checks if the point is inside a contour or not. </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="ga8740e7645628c59d238b0b22c2abe2d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8740e7645628c59d238b0b22c2abe2d4">◆ </a></span>rotatedRectangleIntersection()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int cv::rotatedRectangleIntersection </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../db/dd6/classcv_1_1RotatedRect.html">RotatedRect</a> &amp; </td>
          <td class="paramname"><em>rect1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../db/dd6/classcv_1_1RotatedRect.html">RotatedRect</a> &amp; </td>
          <td class="paramname"><em>rect2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>intersectingRegion</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval, intersectingRegion</td><td>=</td><td>cv.rotatedRectangleIntersection(</td><td class="paramname">rect1, rect2[, intersectingRegion]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d1/d4f/imgproc_2include_2opencv2_2imgproc_8hpp.html">opencv2/imgproc.hpp</a>&gt;</code></p>
<p>Finds out if there is any intersection between two rotated rectangles. </p>
<p>If there is then the vertices of the intersecting region are returned as well.</p>
<p>Below are some examples of intersection configurations. The hatched pattern indicates the intersecting region and the red vertices are returned by the function.</p>
<div class="image">
<img alt="intersection.png" src="../../intersection.png"/>
<div class="caption">
intersection examples</div></div>
 <dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rect1</td><td>First rectangle </td></tr>
    <tr><td class="paramname">rect2</td><td>Second rectangle </td></tr>
    <tr><td class="paramname">intersectingRegion</td><td>The output array of the vertices of the intersecting region. It returns at most 8 vertices. Stored as std::vector&lt;<a class="el" href="../../dc/d84/group__core__basic.html#ga7d080aa40de011e4410bca63385ffe2a">cv::Point2f</a>&gt; or <a class="el" href="../../d3/d63/classcv_1_1Mat.html" title="n-dimensional dense array class ">cv::Mat</a> as Mx1 of type CV_32FC2. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>One of <a class="el" href="../../d3/dc0/group__imgproc__shape.html#gaaf0eb9e10bd5adcbd446cd31fea2db68" title="types of intersection between rectangles ">RectanglesIntersectTypes</a> </dd></dl>
</div>
</div>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.6-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 2 2021 11:36:40 for OpenCV by  <a href="http://www.doxygen.org/index.html">
<img alt="doxygen" class="footer" src="../../doxygen.png"/>
</a> 1.8.13
</small></address>
<script type="text/javascript">
//<![CDATA[
addTutorialsButtons();
//]]>
</script>
</body>
</html>
